Identifying and parameterizing roof types in map data

ABSTRACT

Methods and apparatus for a roof analysis tool for constructing a parameter set, where the parameter set is derived from mapping data for a map region, and where the parameter set describes the roofs for the buildings within the map region. In some cases, the parameter set includes a list of roof type identification values and the respective buildings in the map region for which a given roof type identification value corresponds. The roof analysis tool may operate on a server and work in conjunction with a mobile device, where the mobile device may display map views of a map region such that the map view is based on a three-dimensional model of the map region, and where a portion of the three-dimensional model is based on data generated on the mobile device and a portion of the three-dimensional model is based on data generated on the server.

This application claims benefit of priority to U.S. ProvisionalApplication Ser. No. 61/655,910, entitled “Identifying andParameterizing Roof Types in Map Data,” filed Jun. 5, 2012.

BACKGROUND

Mobile devices often provide various mapping related features such asdisplaying a map view for a region in various modes and according tovarious viewpoints. Traditional mapping applications operable on mobiledevices receive raster image data for a given map region of a map view.However, raster data is unusable for creating three-dimensional modelsof a map region and a corresponding three-dimensional map view of themap region. Further, within a map view of a map application executing ona mobile or desktop device, a user may prefer to see a representation ofthe surrounding environment in an aesthetically simple rendering. Forexample, as a user walks down a street while referencing the map viewprovided by a mobile device, a user may find it easier to navigate ifsurrounding structures in the map view were stripped of unnecessary anddistracting details, texture or other information that may not berelated to navigation or identification of the structure. In some cases,the map view may be three-dimensional, and in such a case a map viewthat is a simplified version of the real world may allow a user to makequicker navigation decisions.

SUMMARY

In one embodiment, a mobile device may use map data for a map region tobe displayed in a map view. From the map data the mobile device mayconstruct a three-dimensional model to serve as the basis for renderinga three-dimensional map view of the map region. Further, the mobiledevice may construct a portion of the three-dimensional model andconstruct another portion of the three-dimensional model based on dataprovided from a server. The data from the server may be a parameter setdescribing each of the planes of a roof on each building in the mapregion, or the parameter set may simply identify roof types for eachbuilding and the mobile device may use the roof types as the basis forrendering roofs for the buildings in the map view. Further, in somecases, the parameter set may include information such as textureinformation corresponding to a given roof, where the texture informationmay be extracted from three-dimensional mesh data.

For example, a mobile device may construct a three-dimensional model ofa map region where the buildings in the three-dimensional models arebased on footprint data from a two-dimensional data set corresponding tothe map region such that the footprint is extruded to a height valuebased on a three-dimensional data set also corresponding to the mapregion. While the constructed three-dimensional model on the mobiledevice represents an approximation of a building, the extrusion of thefootprint to a given height may not provide an accurate representationof the roof of the building.

However, the computational complexity, bandwidth, or storage demandsrelated to processing the map data on the mobile device to constructroof representations for the buildings in a map region based on highdefinition mapping data may prevent the mobile device from providing auser with a responsive experience using the mapping application.Therefore, in some cases, to generate a more accurate three-dimensionalmodel of a map region, a server may perform calculations, in response toa request or prior to a request, in order to produce a set of parametersdescribing the different roofs for the different buildings in the mapregion. Once parameterized, the roof descriptions corresponding to theparameters of the roof may be stored or cached on the mobile device.When the mobile device is provided the set of parameters produced on theserver, the mobile device may combine the three-dimensional modelconstructed on the mobile device with the set of parameters receivedfrom the server in order to produce a three-dimensional model of the mapregion that includes representations of roofs.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is an illustration of a mobile device, according to someembodiments.

FIG. 1B is a diagram illustrating example components within a mobiledevice, according to some embodiments.

FIG. 2 illustrates a touch screen on a mobile device, according to someembodiments.

FIG. 3A illustrates another mobile device configurable to operate inconjunction with a roof analysis tool, according to some embodiments.

FIG. 3B depicts elements of a map service operating environment,according to some embodiments.

FIGS. 4A-4E depict example flowcharts corresponding to differentembodiments of a roof analysis tool, according to some embodiments.

FIGS. 5A and 5B depict illustrations of various map views, according tosome embodiments.

FIGS. 6A-6G illustrates various representations of data used by a roofanalysis tool, according to some embodiments.

FIG. 7 illustrates a non-exhaustive list of example roof types,according to some embodiments.

FIG. 8A illustrates a roof analysis module, according to someembodiments.

FIG. 8B illustrates a map tool module, according to some embodiments.

FIG. 9 depicts elements of an example computer system capable ofimplementing a roof analysis tool.

While the invention is described herein by way of example for severalembodiments and illustrative drawings, those skilled in the art willrecognize that the invention is not limited to the embodiments ordrawings described. It should be understood that the drawings anddetailed description are not intended to limit the invention to theparticular forms disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention. The headings used are fororganizational purposes only and are not meant to be used to limit thescope of the description. As used throughout this application, the word“may” is used in a permissive sense (meaning “having the potential to”),rather than the mandatory sense (meaning “must”). Similarly, the words“include”, “including”, and “includes” mean “including, but not limitedto.”

DETAILED DESCRIPTION OF EMBODIMENTS

Various embodiments are presented of a roof analysis tool forconstructing a parameter set, where the parameter set is derived frommapping data for a map region, and where the parameter set describes theroofs for the buildings within the map region. In some cases, theparameter set simply includes a list of roof type identification valuesand the buildings in the map region for which a given roof typeidentification value corresponds. The mapping data may includecoordinates for a footprint of a building for which a roof type may bedetermined, and the mapping data may also include coordinates for pointsin three-dimensional Cartesian space corresponding to the roof of thebuilding. In some cases, the mapping data may be three-dimensionaldigital surface model (DSM) meshes and the metadata tagged geographicinformation system (GIS) footprint data.

In some cases, a mobile device may operate in conjunction with a roofanalysis tool operating on a server to produce a map view for a mapregion, where the map view is based on a three-dimensional model of themap region, and where the mobile device and the server each provide arepresentation of a portion of the three-dimensional model. However,while the mobile device may operate in conjunction with the roofanalysis tool on the server, the roof analysis tool may, prior to anycommunication with a mobile device, calculate and store parameter setscorresponding to building footprints for any portions of any map regionof the world or all map regions of the world. The calculations by theroof analysis tool may be performed once and stored and then updatedwhen new map information is received. When a mobile device or otherdevice requests information for describing a roof or roof type for agiven map region or footprint coordinate, the pre-calculated and storedparameters sets are indexed and a parameter set corresponding to the mapregion or footprint coordinates may be returned.

For example, a mobile device may receive mapping data for a map regionto be displayed in a map view of a mapping application. In some cases,the mapping data may be vector-based data from which the mobile devicemay generate a portion of a three-dimensional model of the map region,and where the three-dimensional model serves as the basis for renderinga three-dimensional map view of the map region. In constructing thethree-dimensional model the mobile device may use footprint data from atwo-dimensional data set corresponding to the map region such that thefootprint is extruded to a height value based on a three-dimensionaldata set also corresponding to the map region. While the constructedthree-dimensional model on the mobile device represents a roughapproximation of a building, the extrusion of the footprint to a givenheight may not provide a representation of the roof of the building thatcorresponds to the physical dimensions of the roof in the map region.

Further in this example, the computational complexity, bandwidthdemands, or storage requirements on the mobile device to construct roofrepresentations for the buildings in a map region based on the mappingdata may prevent the mobile device from providing a user with aresponsive experience using the mapping application. Therefore, in somecases, to generate a more accurate three-dimensional model of a mapregion while providing a responsive user experience, a server mayperform calculations on the two-dimensional and three-dimensional datasets in order to produce a set of parameters describing the differentroofs for the different buildings in the map region. When the mobiledevice is provided with the set of parameters produced on the server,the mobile device may combine the three-dimensional model constructed onthe mobile device with the set of parameters received from the server inorder to produce a three-dimensional model of the map region thatincludes representations of roofs based on the mapping data.

In this way, a three-dimensional map view of a map region may bedisplayed to a user within the mapping application such that thethree-dimensional map view depicts roof shapes for buildings where theroof shapes are representative of the roof shapes of the actualbuildings described by the mapping data for the map region. In general,the roof shapes are described as clean, or low-parameter versions of theactual roof, and the low-parameter version of the roof may be usedinstead of or together with actual roof data. While in this example, theroof shapes depicted in the map view are representative of the actualroof shapes in a map region, in some cases, the roof analysis tool maygenerate parameter sets of roof shapes that are not based on the mappingdata for a map region. In this way, even though the roof shapes in theparameter set bear no correspondence to the actual roof shapes, the mapview based on a three-dimensional model incorporating the roof shapesdescribed by the parameter set provide the map view with an additionallevel of realism if not accuracy.

In some embodiments, instead of a server sending a set of parameterswith parameter values describing a roof of a building, the server maysend an indication of the type of roof of the building and notadditional information describing the shape of the roof. For example,given a number of different archetypal roof styles, the roof analysistool may determine which of the different archetypal roof styles themapping data for a building footprint matches. In this way, while thearchetypal roof style provided to a mobile device may not be exactlyrepresentative of the actual building roof, the roof style used by themobile device to construct a map view including the building with theroof style may be a close approximation of the actual building. In thisexample, in order to render a roof type for a building in a map view,the mobile device would receive information regarding the different rooftypes and identifiers for each of the different roof types, where thedifferent roof types and identifiers are also stored on the serverimplementing the roof analysis tool. Further, when the mobile devicelater renders a map view of a map region and the mobile device receives,for a building in the map region, an identifier corresponding to thebuilding, the mobile device may scale, possibly disproportionately, thearchetypal roof type corresponding to the received identifier to conformto the footprint of the building.

In some embodiments, a server may begin determining a roof style for abuilding based on two sets of data, one set of data including buildingfootprint data for a map region and another set of data includingthree-dimensional mesh data for the map region. An example footprint,footprint 610, for a building in a map region may be seen in FIG. 6B,and where the footprint 610 corresponds to the building with roof plane602 in FIG. 6A. The mesh data may include vertices and triangles forpoints in 3D space, and where the triangles in the mesh data may depicta surface of the triangle. An example rendering of the mesh data into athree-dimensional digital surface model may be seen in FIG. 6A, where aroof plane, plane 602, corresponds to one of the planes of a roof of abuilding. An example of the mesh data, depicted as triangles such astriangle 620 and triangle 622, may be seen in FIG. 6C. In this example,the map region is determined based on coordinate data provided by amobile device. Once the server determines a roof type for a givenbuilding in the map region, the server may provide the mobile devicewith information on which to base a rendering of the roof type for thegiven building within a map view of the map region.

In this example, for the server to provide a mobile device with acompact representation of a roof type, the server may determine arepresentation for a set of planes, including the coordinates of eachrespective plane, a normal for each respective plane, the size of eachrespective plane, or the dimensions of each respective plane. In someembodiments, instead of using normals, the roof analysis tool maydetermine the shape of a roof based on a tangent plane, in other words,using each triangle in the roof. The compact representation, or compactparameters are compact because the roof type representation does notinclude raster data, but rather the roof type is represented with datawhich serves as the basis for the mobile device to interpret and rendera roof based on the data. In some cases, the compact representation maybe a parameter set including an archetypal roof type classificationalong with an identification for a building within a map region forwhich the archetypal roof classification corresponds. In other cases,the compact representation may be a parameter set including coordinatedata for a plane or planes in a roof along with an identification for abuilding within a map region for which the roof plane coordinate datacorresponds. The coordinate data for a given roof plane may indicatepoints in three-dimensional Cartesian space that correspond to thepoints on the corners of the given plane. In other cases, the coordinatedata may be represented as spherical coordinates, orlatitude/longitude/altitude coordinates, among other options.

In this example, to identify a single plane corresponding to a roof of abuilding, the roof analysis tool uses the footprint data for a buildingin the map region to identify mesh data that corresponds to the regionin the map area for the building footprint. For example, given the areaand coordinates for a footprint, the roof analysis tool may determinethe corresponding area and coordinates for the footprint within the meshdata in order to extract the three-dimensional data that corresponds tothe footprint. Given the mesh data for the footprint, the roof analysistool may identify multiple points at one or more heights that correspondto a roof for the building footprint.

Further, in some embodiments, the roof analysis tool may receivetwo-dimensional footprint data and three-dimensional coordinates fordifferent points on a roof corresponding to a footprint specified withinthe footprint data. Given the three-dimensional coordinates for thepoints on the roof, the roof analysis tool may calculate a normal from aplane defined by a set of three or more adjacent or proximate points onthe roof. In this way, given multiple respective planes defined bymultiple, different respective sets of points, the roof analysis toolmay calculate a normal for each plane. Given the calculation of normalsfor the roof, the roof analysis tool may proceed to remainingcalculations for identifying a roof type. In other embodiments, the roofanalysis tool may use vertex normal, which may be calculated as theweighted average of all the surface normal of the triangles thatsurround a given vertex, where the given vertex is common to theadjacent triangles. In this example, the weighting is proportional tothe surface area of the triangles.

In some embodiments, in order to identify the data with which the roofanalysis tool may determine a roof type for a building in a map region,the input data sets are co-registered to the same coordinate system. Asnoted above, one input data set may be two-dimensional footprint data(as in FIG. 6B) and another data set may be three-dimensional digitalsurface model data (as in FIG. 6A), where each data set may berepresented in a different coordinate system. Therefore, the roofanalysis tool may first convert each data set to a common coordinatesystem. However, in some cases, even when each data set is representedin the same coordinate system, an element in one data set at a givencoordinate may not be in the other data set at the same coordinate. Inother words, while the data sets represent approximately the same mapregion, there may be misalignments between the data sets. To align thedata sets, a region from one data set may be warped or molded to fit tothe other data set. For example, for a map region of a metropolitanarea, common landmarks may be matched in the two data sets, and giventhe aligned common landmarks, the remaining elements in the data setbeing warped are warped to match the other data set. One method foraccomplishing the alignment of the data sets is through the use of aleast squares algorithm, among other possible algorithms. Once thefootprint data set and the 3D mesh data set are aligned, the roofanalysis tool may iterate over each building in the footprint data anduse the coordinate data for each building to extract the 3D mesh datacorresponding to the building. Given that 3D mesh data is highdefinition and includes many data points and triangles, among otherinformation such as texture information, in one embodiment, the meshdata is stored in, for example, a k-d tree and indexed using spatialcoordinates. In this way, as the roof analysis tool is iterating throughthe buildings, the roof analysis tool may use the coordinates of thecurrent building to index in to the k-d tree to extract thecorresponding 3D mesh data. Given 3D mesh data for a given footprint,the roof analysis tool may proceed to identify a roof type for thebuilding.

As noted above, the multiple points on a roof of a building may beorganized as triangles, where a given triangle has a surface. The roofanalysis tool may use the surface of the triangle as the basis ofcalculating a normal to the surface of the triangle. To calculate thenormal to the triangle, the roof analysis tool may use the cross productof any two sides of the triangle. The roof analysis tool may repeat thecalculation of a normal for each of the triangles corresponding to themesh data corresponding to the footprint of a building. An exampledepiction of the calculated normals may be seen in FIG. 6D, whichincludes example normal vectors 630, 632, 634, 636, 638, and 640. Inthis example, each of the normals, or normal vectors, is calculated tobe perpendicular to the surface of a roof plane. Further, in some cases,normals may be calculated at sampled points on a regular grid—without amesh.

In this embodiment, the parameterization of a given normal representedby (nx, ny, nz) may be seen in FIG. 6E, where point 648 a is the pointon the roof surface for which the normal is calculated and point 648 bis the tip of the normal, and where axis 644 is the x-axis, axis 642 isthe y-axis, and axis 646 is the z-axis. Further in this embodiment,given that the direction of the normal is what is used to determine agrouping of normals, we reduce the vector normal parameterization fromthree spatial coordinates to two spherical coordinates. In this example,the spherical coordinatization is by angle ρ (rho) 649 a and angle ψ(psi) 649 b. Further, in a spherical coordinate representation of anormal, the angle ρ (rho) 649 a is the angle between the z-axis and aprojection of the normal onto the x-z plane, and where the projection ofthe normal onto the x-z plane corresponds to line 647 a, and where the ψ(psi) angle 649 b is the angle between the normal vector and the y-axis,where the normal corresponds to vector 647 b.

Further, any two-dimensional parameterization may be used, and anothercoordinate option for representing the normals would be θ-φ (theta-phi).In cases when a Hough transformation is used, the two-dimensionalparameterization feeds into the analysis and Hough transform. However,using θ-φ (theta-phi) coordinates would result in normals for flat roofsurfaces being close to the z-axis, and hence, due to possible noise inthe data, the normals would have azimuth angles that span the entire0-360 degree range. A consequence would be greater difficulty in findingclusters in the Hough domain for flat roofs, where a Houghtransformation to create a Hough domain is one method for finding groupsor clusters of normals. By contrast, using the ρ-ψ (rho-psi)parameterization of a normal results in the y-axis becoming the axispresenting difficulties in finding clusters in a Hough domain, but sincevertical roof surfaces are relatively unimportant, the ρ-ψ (rho-psi)parameterization is used in this example. In some embodiments, anotherparameterization option is to use the x, y values themselves which mayprovide better resolution for steep angles, or roof planes angles thatpoint sharply upward.

As noted above, given the calculation of normals for multiple points ona roof, a Hough transformation may be performed on the normals togenerate a two-dimensional (2D) histogram, which can be interpreted as aprobabilistic heat map, for example, as depicted in FIG. 6G, In thisexample, clusters in the 2D histogram 698, or heat map, are selectedusing a given mass threshold, for example 0.93 (or 93%) of a maximumvalue. Further, the threshold may either be a fixed absolute value, arelative value such as a percentage of the maximum value, or thethreshold may be determined locally based on the data. In this way, theaverage vector of each cluster may be output as the planar surfacenormal for the entire cluster. Further in regard to FIG. 6G, histogram698 depicts a Hough transform of all roof triangle surface normals thatare less than 80 degrees off of the z axis. For example, the roofanalysis tool may iterate over all normals and calculate two angles foreach normal, the rho and psi angles, and place a point in the histogramat the point corresponding to the calculated rho and psi angles for eachnormal. In histogram 698, the four clusters are clusters 682, 684, 686,and 688. As another example of a histogram generated through a Houghtransformation, histogram 699 is a Hough transform of roof trianglesurface normals with a bin count greater than 4, and the four clustersare clusters 690, 692, 694, and 696. Using a Hough transform, mostnormals on a given plane or surface would fall in to the same bin.Further, for a given cluster, the centroid of a given cluster may betaken as the average normal for the cluster and provide a nominalorientation for a roof plane. Given identified clusters, the roofanalysis tool may iterate over each normal and classify each normalaccording to which average normal for a cluster the normal is nearest.As noted earlier, FIG. 6D depicts several clusters of normals for aroof, and the clusters may be used to detect if a roof is flat or notwithin a given probability.

Further, based on the calculated clusters the roof analysis tool maydetermine a respective plane corresponding to a respective cluster ofnormals, where the average vector of the cluster may be defined to bethe planar surface normal for the respective plane. FIG. 6F includesvarious planes that correspond to the various clusters of normals inFIG. 6D. For example, plane 650 corresponds to cluster of normals 630,and plane 652 corresponds to cluster of normals 638. This identificationof planes may be repeated for each of the clusters of normals withinFIG. 6D.

However, it may be the case that identified planes corresponding to thegroups of normals may be separate in space. Therefore, to determine aparameter set for planes that align and meet as the planes of a roofwould align and meet, the roof analysis tool may perform additionalsteps such as mesh filtering and a convex hull analysis of classifiedroof plane triangles corresponding to the mesh filtering results. Forexample, given the determined clusters of normals, the roof analysistool may classify each of the triangles in the three-dimensional meshdata corresponding to the points on the roof, such as the classificationof triangle 621 and classification of triangles 623 in FIG. 6C. However,holes, such as hole 624, may be present as a result of chimneys, roofvents, rooftop mounted machinery, or possibly any item or object that isnot flat to the roof. These holes are areas within the bounded mesh roofdata that are small enough and possibly irregular enough to not resultin a cluster of vector normals that exceed a threshold, according to,for example, a Hough transformation. To eliminate the holes, the roofanalysis tool may grow the mesh area around the hole and classify thearea of the hole according to the classification of the majority oftriangles surrounding the hole. For example, hole 624 is surrounded bytriangles classified according to a single cluster, and therefore hole624 is classified to be part of the same classified triangles. Once eachhole has been covered, the classified mesh triangles may be converted toa corresponding plane, such as in FIG. 6F, whose planes correspond withthe classified mesh triangles in FIG. 6C. From the planes in FIG. 6F,the roof analysis tool may then determine a set of adjoining planes thatdo not overlap and that may be described with a parameter set thatincludes coordinate values for each of the component planes in the roof.

In some embodiments, regardless of the actual roof type, a roof analysistool may interpret a roof to be either flat (or horizontal) and non-flatroofs. For example, if all or most of the normals have a rho angle closeto zero and a psi angle close to 90 degrees, then the normal is pointingrelatively upward, indicating a flat roof. In this example, the roofanalysis tool may use a threshold value in order to determine whether ornot the roof is flat, for example, if greater than half of the normalshave rho angles close to zero and psi angles close to 90 degrees, thenthe roof analysis tool may determine the roof is flat, and non-flatotherwise. Other thresholds may also be used, where the threshold isdefined prior to the determination of whether the normals have rhoangles close to zero and psi angles close to 90 degrees.

However, in embodiments where the roof analysis tool determines anactual roof type, once each plane in a roof of a building has beenidentified, each of the planes may be parameterized, or otherwiserepresented in a compact format. In some cases, the planes determined tocorrespond to groups of normals may overlap, as reflected in FIG. 6F.Further, the outline or perimeter of a given plane may not be composedof straight lines, as reflected by plane 652 in FIG. 6F. Therefore, togenerate a parameterized version of the planes, the roof analysis toolmay fit each given plane to a polygon and also fit each of the polygonstogether to form a set of planes that do not overlap and that are madeof straight lines. In other cases, the roof analysis tool may simplyeliminate the overlap for the different planes and create a parameterset each of the resulting planes. Once a parameterized set of data hasbeen defined, the roof analysis tool may store the parameter set orprovide the parameter set for the roof of the building to a mobiledevice or desktop computer requesting roof information in order torender a map view of a map region.

Further, given a database of possible roof types, these clusters may beused to match a roof type for a given building. For example, given a(non-exhaustive) list of roof types in FIG. 7, the roof analysis toolmay determine that the clusters of normals for the roof in FIG. 6D maymatch roof type 702, which is a hip and valley type roof. As foridentifying a roof type based on clusters of normal, several method maybe used, for example, a probabilistic machine learning based classifiers(such as a support vector machine), a neural network, or aclassification tree (or forest of boosted trees). For the machinelearning identification methods, an example training set may be multiplepairs of respective example normal clusters and a respectivecorresponding roof type. In this way, where a mobile device stores acorresponding database of roof types, the roof analysis tool maytransmit a roof type indicator without transmitting the parametersdefining the actual roof planes of a roof of a building determinedthrough the process used to determine the roof type. For example, incases when the mobile device constructs a three-dimensional model thatincludes an extrusion of a footprint for a given building, the roofanalysis tool may simply transmit roof type “A”, or any otheridentification value, and the mobile device may then interpret the rooftype and render the indicated roof type on top of the correspondingbuilding. In cases when the mobile device does not construct arepresentation of the building extruded to a height value, the roofanalysis tool may transmit coordinates for the footprint, a heightvalue, and an identification value for the roof type corresponding tothe footprint. In some cases, the mobile device, in requesting roof typeparameters, may specify elements to be included in the parameter set,such as footprint coordinates, a parameterized set of planes making upthe roof, a roof type identification, or a height value corresponding tothe footprint, where the height value may be calculated from a averageof height values from vertices in the roof triangles, or the heightvalue may be based on a single random sample of a roof triangle vertex.Further, for the given roof type, the roof analysis tool may simplyscale the dimensions of the roof type to match the dimensions of thefootprint of the building and render the roof at the top of athree-dimensional version of the building. While in this example, theplanes of the roof rendered for the building may not match the realworld planes of the roof of the building, the roof type may be similar,thereby still providing a semblance of the real world.

In one embodiment, as an alternative to using a Hough transform (orother transform) based approach, the roof analysis tool may determinebetween whether or not the roof is a flat roof, and if the roof is flatthen the roof analysis tool provides a parameterization indicating aflat roof. If the roof is not flat, the roof analysis tool may select adefault non-flat roof type, or the roof analysis tool may randomlyselect from a list of non-flat roof types and provide a parameter setindicating the selection. For example, the roof analysis tool may, forthe points on the roof extracted from three-dimensional mesh data,calculate the variance of the z values for the three-dimensionalCartesian coordinates of each point. The roof analysis tool may thensort the variances, and if there is a low variance, the roof analysistool determines the roof to be flat, and non-flat otherwise. The roofanalysis tool may base the determination on whether the variance is lowenough through the use of a threshold value that is defined prior toanalyzing the points on the roof, where if the variance is above thethreshold then the roof is determined to be non-flat.

In some embodiments, the roof analysis for buildings may be done beforeany data regarding roof types is requested. For example, for every mapregion, or in some cases for the most popular map regions, the roofanalysis may be performed in parallel on one or more servers or serverfarms. In such a parallel approach, a given server may be tasked to workon a given map region.

In some embodiments, a mobile device may entirely perform thecalculations described herein to determine a roof shape for a buildingwithin a map region, where the calculations are based on the mappingdata for the map region.

In some embodiments, the server may perform the calculations describedherein to determine a roof shape for a building within a map region,where the calculations are based on the mapping data for the map region.In some cases, the server may receive high-resolution three-dimensionalmesh data depicting the surfaces within a map region as representedaccording to multiple triangles.

In some embodiments, given the 3D mesh data for a map region, the roofanalysis tool may reference a two-dimensional data set that includesfootprint data, where the two-dimensional data set corresponds to themap region. The footprint information may include the location anddimensions of the physical boundaries of a given building within the maparea. For example, in a simple case of a square building, the footprintmay specify the locations of each corner of the building along with thelength of each side of the building. In this example, if the squarebuilding has two stories and a flat roof, a simple cube may provide anaccurate representation of the volume and dimensions occupied by thebuilding within the map region. Further, as described above, a depictionof a simple cube may provide a more efficiently usable map view. Whilethe footprint in this example is a simple square, in general, the maptool may operate on any shape of footprint.

Detailed Description Considerations

In the following detailed description, numerous details are set forth toprovide a thorough understanding of the claimed subject matter. However,it will be understood by those skilled in the art that the claimedsubject matter may be practiced without these specific details. In otherinstances, methods, apparatus or systems that would be known by one ofordinary skill have not been described in detail so as not to obscureclaimed subject matter.

It will also be understood that, although the terms first, second, etc.may be used herein to describe various elements, these elements shouldnot be limited by these terms. These terms are only used to distinguishone element from another. For example, a first contact could be termed asecond contact, and, similarly, a second contact could be termed a firstcontact, without departing from the scope of the present invention. Thefirst contact and the second contact are both contacts, but they are notthe same contact.

Embodiments of electronic devices, user interfaces for such devices, andassociated processes for using such devices are described. In someembodiments, the device is a portable communications device, such as amobile telephone, that also contains other functions, such as PDA and/ormusic player functions. Exemplary embodiments of mobile devices include,without limitation, the iPhone®, iPod Touch®, and iPad® devices fromApple Inc. of Cupertino, Calif. Other portable electronic devices, suchas laptops or tablet computers with touch-sensitive surfaces (e.g.,touch screen displays and/or touch pads), may also be used. It shouldalso be understood that, in some embodiments, the device is not aportable communications device, but is a desktop computer with atouch-sensitive surface (e.g., a touch screen display and/or a touchpad). In some embodiments, the device is a gaming computer withorientation sensors (e.g., orientation sensors in a gaming controller).

In the discussion that follows, an electronic device that includes adisplay and a touch-sensitive surface is described. It should beunderstood, however, that the electronic device may include one or moreother physical user-interface devices, such as a physical keyboard, amouse and/or a joystick.

The device typically supports a variety of applications, such as one ormore of the following: a drawing application, a presentationapplication, a word processing application, a website creationapplication, a disk authoring application, a spreadsheet application, agaming application, a telephone application, a video conferencingapplication, an e-mail application, an instant messaging application, aworkout support application, a photo management application, a digitalcamera application, a digital video camera application, a web browsingapplication, a digital music player application, and/or a digital videoplayer application.

The various applications that may be executed on the device may use atleast one common physical user-interface device, such as thetouch-sensitive surface. One or more functions of the touch-sensitivesurface as well as corresponding information displayed on the device maybe adjusted and/or varied from one application to the next and/or withina respective application. In this way, a common physical architecture(such as the touch-sensitive surface) of the device may support thevariety of applications with user interfaces that are intuitive andtransparent to the user.

Some portions of the detailed description which follow are presented interms of algorithms or symbolic representations of operations on binarydigital signals stored within a memory of a specific apparatus orspecial purpose computing device or platform. In the context of thisparticular specification, the term specific apparatus or the likeincludes a general purpose computer once it is programmed to performparticular functions pursuant to instructions from program software.Algorithmic descriptions or symbolic representations are examples oftechniques used by those of ordinary skill in the signal processing orrelated arts to convey the substance of their work to others skilled inthe art. An algorithm is here, and is generally, considered to be aself-consistent sequence of operations or similar signal processingleading to a desired result. In this context, operations or processinginvolve physical manipulation of physical quantities. Typically,although not necessarily, such quantities may take the form ofelectrical or magnetic signals capable of being stored, transferred,combined, compared or otherwise manipulated. It has proven convenient attimes, principally for reasons of common usage, to refer to such signalsas bits, data, values, elements, symbols, characters, terms, numbers,numerals or the like. It should be understood, however, that all ofthese or similar terms are to be associated with appropriate physicalquantities and are merely convenient labels. Unless specifically statedotherwise, as apparent from the following discussion, it is appreciatedthat throughout this specification discussions utilizing terms such as“processing”, “computing”, “calculating”, “determining”, or the likerefer to actions or processes of a specific apparatus, such as a specialpurpose computer or a similar special purpose electronic computingdevice. In the context of this specification, therefore, a specialpurpose computer or a similar special purpose electronic computingdevice is capable of manipulating or transforming signals, typicallyrepresented as physical electronic or magnetic quantities withinmemories, registers, or other information storage devices, transmissiondevices, or display devices of the special purpose computer or similarspecial purpose electronic computing device.

Example Mobile Device

Attention is now directed toward embodiments of portable devices withtouch-sensitive displays. FIG. 1A is a block diagram illustratingportable mobile device 100 with touch-sensitive displays 112 inaccordance with some embodiments. Touch-sensitive display 112 issometimes called a “touch screen” for convenience, and may also be knownas or called a touch-sensitive display system. Device 100 may includememory 102 (which may include one or more computer-readable storagemediums, including non-transitory computer-readable storage mediums),memory controller 122, one or more processing units (CPU's) 120,peripherals interface 118, RF circuitry 108, audio circuitry 110,speaker 111, microphone 113, input/output (I/O) subsystem 106, otherinput or control devices 116, and external port 124. Device 100 mayinclude one or more optical sensors 164. These components maycommunicate over one or more communication buses or signal lines 103.

It should be appreciated that device 100 is only one example of aportable mobile device, and that device 100 may have more or fewercomponents than shown, may combine two or more components, or may have adifferent configuration or arrangement of the components. The variouscomponents shown in FIG. 1A may be implemented in hardware, software, ora combination of both hardware and software, including one or moresignal processing and/or application specific integrated circuits.

Memory 102 may include high-speed random access memory and may alsoinclude non-volatile memory, such as one or more magnetic disk storagedevices, flash memory devices, or other non-volatile solid-state memorydevices. Access to memory 102 by other components of device 100, such asCPU 120 and the peripherals interface 118, may be controlled by memorycontroller 122.

Peripherals interface 118 can be used to couple input and outputperipherals of the device to CPU 120 and memory 102. The one or moreprocessors 120 run or execute various software programs and/or sets ofinstructions stored in memory 102 to perform various functions fordevice 100 and to process data.

In some embodiments, peripherals interface 118, CPU 120, and memorycontroller 122 may be implemented on a single chip, such as chip 104. Insome other embodiments, they may be implemented on separate chips.

RF (radio frequency) circuitry 108 receives and sends RF signals, alsocalled electromagnetic signals. RF circuitry 108 converts electricalsignals to/from electromagnetic signals and communicates withcommunications networks and other communications devices via theelectromagnetic signals. RF circuitry 108 may include well-knowncircuitry for performing these functions, including but not limited toan antenna system, an RF transceiver, one or more amplifiers, a tuner,one or more oscillators, a digital signal processor, a CODEC chipset, asubscriber identity module (SIM) card, memory, and so forth. RFcircuitry 108 may communicate with networks, such as the Internet, alsoreferred to as the World Wide Web (WWW), an intranet and/or a wirelessnetwork, such as a cellular telephone network, a wireless local areanetwork (LAN) and/or a metropolitan area network (MAN), and otherdevices by wireless communication. The wireless communication may useany of multiple communications standards, protocols and technologies,including but not limited to Global System for Mobile Communications(GSM), Enhanced Data GSM Environment (EDGE), high-speed downlink packetaccess (HSDPA), high-speed uplink packet access (HSUPA), wideband codedivision multiple access (W-CDMA), code division multiple access (CDMA),time division multiple access (TDMA), Bluetooth, Wireless Fidelity(Wi-Fi) (e.g., IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and/or IEEE802.11n), voice over Internet Protocol (VoIP), Wi-MAX, a protocol fore-mail (e.g., Internet message access protocol (IMAP) and/or post officeprotocol (POP)), instant messaging (e.g., extensible messaging andpresence protocol (XMPP), Session Initiation Protocol for InstantMessaging and Presence Leveraging Extensions (SIMPLE), Instant Messagingand Presence Service (IMPS)), and/or Short Message Service (SMS), or anyother suitable communication protocol, including communication protocolsnot yet developed as of the filing date of this document.

Audio circuitry 110, speaker 111, and microphone 113 provide an audiointerface between a user and device 100. Audio circuitry 110 receivesaudio data from peripherals interface 118, converts the audio data to anelectrical signal, and transmits the electrical signal to speaker 111.Speaker 111 converts the electrical signal to human-audible sound waves.Audio circuitry 110 also receives electrical signals converted bymicrophone 113 from sound waves. Audio circuitry 110 converts theelectrical signal to audio data and transmits the audio data toperipherals interface 118 for processing. Audio data may be retrievedfrom and/or transmitted to memory 102 and/or RF circuitry 108 byperipherals interface 118. In some embodiments, audio circuitry 110 alsoincludes a headset jack (e.g., 212, FIG. 2). The headset jack providesan interface between audio circuitry 110 and removable audioinput/output peripherals, such as output-only headphones or a headsetwith both output (e.g., a headphone for one or both ears) and input(e.g., a microphone).

I/O subsystem 106 couples input/output peripherals on device 100, suchas touch screen 112 and other input control devices 116, to peripheralsinterface 118. I/O subsystem 106 may include display controller 156 andone or more input controllers 160 for other input or control devices.The one or more input controllers 160 receive/send electrical signalsfrom/to other input or control devices 116. The other input controldevices 116 may include physical buttons (e.g., push buttons, rockerbuttons, etc.), dials, slider switches, joysticks, click wheels, and soforth. In some alternate embodiments, input controller(s) 160 may becoupled to any (or none) of the following: a keyboard, infrared port,USB port, and a pointer device such as a mouse. The one or more buttons(e.g., 208, FIG. 2) may include an up/down button for volume control ofspeaker 111 and/or microphone 113. The one or more buttons may include apush button (e.g., 206, FIG. 2).

Touch-sensitive display 112 provides an input interface and an outputinterface between the device and a user. Display controller 156 receivesand/or sends electrical signals from/to touch screen 112. Touch screen112 displays visual output to the user. The visual output may includegraphics, text, icons, video, and any combination thereof (collectivelytermed “graphics”). In some embodiments, some or all of the visualoutput may correspond to user-interface objects.

Touch screen 112 has a touch-sensitive surface, sensor or set of sensorsthat accepts input from the user based on haptic and/or tactile contact.Touch screen 112 and display controller 156 (along with any associatedmodules and/or sets of instructions in memory 102) detect contact (andany movement or breaking of the contact) on touch screen 112 andconverts the detected contact into interaction with user-interfaceobjects (e.g., one or more soft keys, icons, web pages or images) thatare displayed on touch screen 112. In an exemplary embodiment, a pointof contact between touch screen 112 and the user corresponds to a fingerof the user.

Touch screen 112 may use LCD (liquid crystal display) technology, LPD(light emitting polymer display) technology, or LED (light emittingdiode) technology, although other display technologies may be used inother embodiments. Touch screen 112 and display controller 156 maydetect contact and any movement or breaking thereof using any ofmultiple touch sensing technologies now known or later developed,including but not limited to capacitive, resistive, infrared, andsurface acoustic wave technologies, as well as other proximity sensorarrays or other elements for determining one or more points of contactwith touch screen 112. In an exemplary embodiment, projected mutualcapacitance sensing technology is used, such as that found in theiPhone®, iPod Touch®, and iPad® from Apple Inc. of Cupertino, Calif.

Touch screen 112 may have a video resolution in excess of 100 dpi. Insome embodiments, the touch screen has a video resolution ofapproximately 160 dpi. The user may make contact with touch screen 112using any suitable object or appendage, such as a stylus, a finger, andso forth. In some embodiments, the user interface is designed to workprimarily with finger-based contacts and gestures, which can be lessprecise than stylus-based input due to the larger area of contact of afinger on the touch screen. In some embodiments, the device translatesthe rough finger-based input into a precise pointer/cursor position orcommand for performing the actions desired by the user.

In some embodiments, in addition to the touch screen, device 100 mayinclude a touchpad (not shown) for activating or deactivating particularfunctions. In some embodiments, the touchpad is a touch-sensitive areaof the device that, unlike the touch screen, does not display visualoutput. The touchpad may be a touch-sensitive surface that is separatefrom touch screen 112 or an extension of the touch-sensitive surfaceformed by the touch screen.

Device 100 also includes power system 162 for powering the variouscomponents. Power system 162 may include a power management system, oneor more power sources (e.g., battery, alternating current (AC)), arecharging system, a power failure detection circuit, a power converteror inverter, a power status indicator (e.g., a light-emitting diode(LED)) and any other components associated with the generation,management and distribution of power in portable devices.

Device 100 may also include one or more optical sensors 164. FIG. 1Ashows an optical sensor coupled to optical sensor controller 158 in I/Osubsystem 106. Optical sensor 164 may include charge-coupled device(CCD) or complementary metal-oxide semiconductor (CMOS)phototransistors. Optical sensor 164 receives light from theenvironment, projected through one or more lens, and converts the lightto data representing an image. In conjunction with imaging module 143(also called a camera module), optical sensor 164 may capture stillimages or video. In some embodiments, an optical sensor is located onthe back of device 100, opposite touch screen display 112 on the frontof the device, so that the touch screen display may be used as aviewfinder for still and/or video image acquisition. In someembodiments, another optical sensor is located on the front of thedevice so that the user's image may be obtained for videoconferencingwhile the user views the other video conference participants on thetouch screen display.

Device 100 may also include one or more proximity sensors 166. FIG. 1Ashows proximity sensor 166 coupled to peripherals interface 118.Alternately, proximity sensor 166 may be coupled to input controller 160in I/O subsystem 106. In some embodiments, the proximity sensor turnsoff and disables touch screen 112 when the mobile device is placed nearthe user's ear (e.g., when the user is making a phone call).

Device 100 includes one or more orientation sensors 168. In someembodiments, the one or more orientation sensors include one or moreaccelerometers (e.g., one or more linear accelerometers and/or one ormore rotational accelerometers). In some embodiments, the one or moreorientation sensors include one or more gyroscopes. In some embodiments,the one or more orientation sensors include one or more magnetometers.In some embodiments, the one or more orientation sensors include one ormore of global positioning system (GPS), Global Navigation SatelliteSystem (GLONASS), and/or other global navigation system receivers. TheGPS, GLONASS, and/or other global navigation system receivers may beused for obtaining information concerning the location and orientation(e.g., portrait or landscape) of device 100. In some embodiments, theone or more orientation sensors include any combination oforientation/rotation sensors. FIG. 1A shows the one or more orientationsensors 168 coupled to peripherals interface 118. Alternately, the oneor more orientation sensors 168 may be coupled to an input controller160 in I/O subsystem 106. In some embodiments, information is displayedon the touch screen display in a portrait view or a landscape view basedon an analysis of data received from the one or more orientationsensors.

In some embodiments, the software components stored in memory 102include operating system 126, communication module (or set ofinstructions) 128, contact/motion module (or set of instructions) 130,graphics module (or set of instructions) 132, text input module (or setof instructions) 134, Global Positioning System (GPS) module (or set ofinstructions) 135, and applications (or sets of instructions) 136.Furthermore, in some embodiments memory 102 stores device/globalinternal state 157, as shown in FIGS. 1A and 3. Device/global internalstate 157 includes one or more of: active application state, indicatingwhich applications, if any, are currently active; display state,indicating what applications, views or other information occupy variousregions of touch screen display 112; sensor state, including informationobtained from the device's various sensors and input control devices116; and location information concerning the device's location and/orattitude.

Operating system 126 (e.g., Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS, oran embedded operating system such as VxWorks) includes various softwarecomponents and/or drivers for controlling and managing general systemtasks (e.g., memory management, storage device control, powermanagement, etc.) and facilitates communication between various hardwareand software components.

Communication module 128 facilitates communication with other devicesover one or more external ports 124 and also includes various softwarecomponents for handling data received by RF circuitry 108 and/orexternal port 124. External port 124 (e.g., Universal Serial Bus (USB),FIREWIRE, etc.) is adapted for coupling directly to other devices orindirectly over a network (e.g., the Internet, wireless LAN, etc.). Insome embodiments, the external port is a multi-pin (e.g., 30-pin)connector that is the same as, or similar to and/or compatible with the30-pin connector used on iPod (trademark of Apple Inc.) devices.

Contact/motion module 130 may detect contact with touch screen 112 (inconjunction with display controller 156) and other touch sensitivedevices (e.g., a touchpad or physical click wheel). Contact/motionmodule 130 includes various software components for performing variousoperations related to detection of contact, such as determining ifcontact has occurred (e.g., detecting a finger-down event), determiningif there is movement of the contact and tracking the movement across thetouch-sensitive surface (e.g., detecting one or more finger-draggingevents), and determining if the contact has ceased (e.g., detecting afinger-up event or a break in contact). Contact/motion module 130receives contact data from the touch-sensitive surface. Determiningmovement of the point of contact, which is represented by a series ofcontact data, may include determining speed (magnitude), velocity(magnitude and direction), and/or an acceleration (a change in magnitudeand/or direction) of the point of contact. These operations may beapplied to single contacts (e.g., one finger contacts) or to multiplesimultaneous contacts (e.g., “multitouch”/multiple finger contacts). Insome embodiments, contact/motion module 130 and display controller 156detect contact on a touchpad.

Contact/motion module 130 may detect a gesture input by a user.Different gestures on the touch-sensitive surface have different contactpatterns. Thus, a gesture may be detected by detecting a particularcontact pattern. For example, detecting a finger tap gesture includesdetecting a finger-down event followed by detecting a finger-up (liftoff) event at the same position (or substantially the same position) asthe finger-down event (e.g., at the position of an icon). As anotherexample, detecting a finger swipe gesture on the touch-sensitive surfaceincludes detecting a finger-down event followed by detecting one or morefinger-dragging events, and subsequently followed by detecting afinger-up (lift off) event. In some embodiments, a gesture may bedetected through a camera directed at a user's hand, where the gestureis performed without contact on the screen of the mobile device.

Graphics module 132 includes various known software components forrendering and displaying graphics on touch screen 112 or other display,including components for changing the intensity of graphics that aredisplayed. As used herein, the term “graphics” includes any object thatcan be displayed to a user, including without limitation text, webpages, icons (such as user-interface objects including soft keys),digital images, videos, animations and the like.

In some embodiments, graphics module 132 stores data representinggraphics to be used. Each graphic may be assigned a corresponding code.Graphics module 132 receives, from applications etc., one or more codesspecifying graphics to be displayed along with, if necessary, coordinatedata and other graphic property data, and then generates screen imagedata to output to display controller 156.

Text input module 134, which may be a component of graphics module 132,provides soft keyboards for entering text in various applications (e.g.,contacts 137, e-mail 140, IM 141, browser 147, and any other applicationthat needs text input).

GPS module 135 determines the location of the device and provides thisinformation for use in various applications (e.g., to telephone 138 foruse in location-based dialing, to camera 143 as picture/video metadata,and to applications that provide location-based services such as weatherwidgets, local yellow page widgets, and map/navigation widgets).

Applications 136 may include the following modules (or sets ofinstructions), or a subset or superset thereof:

-   -   contacts module 137 (sometimes called an address book or contact        list);    -   telephone module 138;    -   video conferencing module 139;    -   e-mail client module 140;    -   instant messaging (IM) module 141;    -   workout support module 142;    -   camera module 143 for still and/or video images;    -   image management module 144;    -   browser module 147;    -   calendar module 148;    -   widget modules 149, which may include one or more of: weather        widget 149-1, stocks widget 149-2, calculator widget 149-3,        alarm clock widget 149-4, dictionary widget 149-5, and other        widgets obtained by the user, as well as user-created widgets        149-6;    -   widget creator module 150 for making user-created widgets 149-6;    -   search module 151;    -   video and music player module 152, which may be made up of a        video player    -   module and a music player module;    -   notes module 153;    -   map module 154; and/or    -   online video module 155.

Examples of other applications 136 that may be stored in memory 102include other word processing applications, other image editingapplications, drawing applications, presentation applications,JAVA-enabled applications, encryption, digital rights management, voicerecognition, and voice replication.

In conjunction with touch screen 112, display controller 156, contactmodule 130, graphics module 132, and text input module 134, contactsmodule 137 may be used to manage an address book or contact list (e.g.,stored in application internal state 192 of contacts module 137 inmemory 102 or memory 370), including: adding name(s) to the addressbook; deleting name(s) from the address book; associating telephonenumber(s), e-mail address(es), physical address(es) or other informationwith a name; associating an image with a name; categorizing and sortingnames; providing telephone numbers or e-mail addresses to initiateand/or facilitate communications by telephone 138, video conference 139,e-mail 140, or IM 141; and so forth.

In conjunction with RF circuitry 108, audio circuitry 110, speaker 111,microphone 113, touch screen 112, display controller 156, contact module130, graphics module 132, and text input module 134, telephone module138 may be used to enter a sequence of characters corresponding to atelephone number, access one or more telephone numbers in address book137, modify a telephone number that has been entered, dial a respectivetelephone number, conduct a conversation and disconnect or hang up whenthe conversation is completed. As noted above, the wirelesscommunication may use any of multiple communications standards,protocols and technologies.

In conjunction with RF circuitry 108, audio circuitry 110, speaker 111,microphone 113, touch screen 112, display controller 156, optical sensor164, optical sensor controller 158, contact module 130, graphics module132, text input module 134, contact list 137, and telephone module 138,videoconferencing module 139 includes executable instructions toinitiate, conduct, and terminate a video conference between a user andone or more other participants in accordance with user instructions.

In conjunction with RF circuitry 108, touch screen 112, displaycontroller 156, contact module 130, graphics module 132, and text inputmodule 134, e-mail client module 140 includes executable instructions tocreate, send, receive, and manage e-mail in response to userinstructions. In conjunction with image management module 144, e-mailclient module 140 makes it very easy to create and send e-mails withstill or video images taken with camera module 143.

In conjunction with RF circuitry 108, touch screen 112, displaycontroller 156, contact module 130, graphics module 132, and text inputmodule 134, the instant messaging module 141 includes executableinstructions to enter a sequence of characters corresponding to aninstant message, to modify previously entered characters, to transmit arespective instant message (for example, using a Short Message Service(SMS) or Multimedia Message Service (MMS) protocol for telephony-basedinstant messages or using XMPP, SIMPLE, or IMPS for Internet-basedinstant messages), to receive instant messages and to view receivedinstant messages. In some embodiments, transmitted and/or receivedinstant messages may include graphics, photos, audio files, video filesand/or other attachments as are supported in a MMS and/or an EnhancedMessaging Service (EMS). As used herein, “instant messaging” refers toboth telephony-based messages (e.g., messages sent using SMS or MMS) andInternet-based messages (e.g., messages sent using XMPP, SIMPLE, orIMPS).

In conjunction with RF circuitry 108, touch screen 112, displaycontroller 156, contact module 130, graphics module 132, text inputmodule 134, GPS module 135, map module 154, and music player module 146,workout support module 142 includes executable instructions to createworkouts (e.g., with time, distance, and/or calorie burning goals);communicate with workout sensors (sports devices); receive workoutsensor data; calibrate sensors used to monitor a workout; select andplay music for a workout; and display, store and transmit workout data.

In conjunction with touch screen 112, display controller 156, opticalsensor(s) 164, optical sensor controller 158, contact module 130,graphics module 132, and image management module 144, camera module 143includes executable instructions to capture still images or video(including a video stream) and store them into memory 102, modifycharacteristics of a still image or video, or delete a still image orvideo from memory 102.

In conjunction with touch screen 112, display controller 156, contactmodule 130, graphics module 132, text input module 134, and cameramodule 143, image management module 144 includes executable instructionsto arrange, modify (e.g., edit), or otherwise manipulate, label, delete,present (e.g., in a digital slide show or album), and store still and/orvideo images.

In conjunction with RF circuitry 108, touch screen 112, display systemcontroller 156, contact module 130, graphics module 132, and text inputmodule 134, browser module 147 includes executable instructions tobrowse the Internet in accordance with user instructions, includingsearching, linking to, receiving, and displaying web pages or portionsthereof, as well as attachments and other files linked to web pages.

In conjunction with RF circuitry 108, touch screen 112, display systemcontroller 156, contact module 130, graphics module 132, text inputmodule 134, e-mail client module 140, and browser module 147, calendarmodule 148 includes executable instructions to create, display, modify,and store calendars and data associated with calendars (e.g., calendarentries, to do lists, etc.) in accordance with user instructions.

In conjunction with RF circuitry 108, touch screen 112, display systemcontroller 156, contact module 130, graphics module 132, text inputmodule 134, and browser module 147, widget modules 149 aremini-applications that may be downloaded and used by a user (e.g.,weather widget 149-1, stocks widget 149-2, calculator widget 1493, alarmclock widget 149-4, and dictionary widget 149-5) or created by the user(e.g., user-created widget 149-6). In some embodiments, a widgetincludes an HTML (Hypertext Markup Language) file, a CSS (CascadingStyle Sheets) file, and a JavaScript file. In some embodiments, a widgetincludes an XML (Extensible Markup Language) file and a JavaScript file(e.g., Yahoo! Widgets).

In conjunction with RF circuitry 108, touch screen 112, display systemcontroller 156, contact module 130, graphics module 132, text inputmodule 134, and browser module 147, the widget creator module 150 may beused by a user to create widgets (e.g., turning a user-specified portionof a web page into a widget).

In conjunction with touch screen 112, display system controller 156,contact module 130, graphics module 132, and text input module 134,search module 151 includes executable instructions to search for text,music, sound, image, video, and/or other files in memory 102 that matchone or more search criteria (e.g., one or more user-specified searchterms) in accordance with user instructions.

In conjunction with touch screen 112, display system controller 156,contact module 130, graphics module 132, audio circuitry 110, speaker111, RF circuitry 108, and browser module 147, video and music playermodule 152 includes executable instructions that allow the user todownload and play back recorded music and other sound files stored inone or more file formats, such as MP3 or AAC files, and executableinstructions to display, present or otherwise play back videos (e.g., ontouch screen 112 or on an external, connected display via external port124). In some embodiments, device 100 may include the functionality ofan MP3 player, such as an iPod (trademark of Apple Inc.).

In conjunction with touch screen 112, display controller 156, contactmodule 130, graphics module 132, and text input module 134, notes module153 includes executable instructions to create and manage notes, to dolists, and the like in accordance with user instructions.

In conjunction with RF circuitry 108, touch screen 112, display systemcontroller 156, contact module 130, graphics module 132, text inputmodule 134, GPS module 135, and browser module 147, map module 154 maybe used to receive, display, modify, and store maps and data associatedwith maps (e.g., driving directions; data on stores and other points ofinterest at or near a particular location; and other location-baseddata) in accordance with user instructions.

In conjunction with touch screen 112, display system controller 156,contact module 130, graphics module 132, audio circuitry 110, speaker111, RF circuitry 108, text input module 134, e-mail client module 140,and browser module 147, online video module 155 includes instructionsthat allow the user to access, browse, receive (e.g., by streamingand/or download), play back (e.g., on the touch screen or on anexternal, connected display via external port 124), send an e-mail witha link to a particular online video, and otherwise manage online videosin one or more file formats, such as H.264. In some embodiments, instantmessaging module 141, rather than e-mail client module 140, is used tosend a link to a particular online video.

Each of the above identified modules and applications correspond to aset of executable instructions for performing one or more functionsdescribed above and the methods described in this application (e.g., thecomputer-implemented methods and other information processing methodsdescribed herein). These modules (i.e., sets of instructions) need notbe implemented as separate software programs, procedures or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various embodiments. In some embodiments, memory 102 maystore a subset of the modules and data structures identified above.Furthermore, memory 102 may store additional modules and data structuresnot described above.

In some embodiments, device 100 is a device where operation of apredefined set of functions on the device is performed exclusivelythrough a touch screen and/or a touchpad. By using a touch screen and/ora touchpad as the primary input control device for operation of device100, the number of physical input control devices (such as push buttons,dials, and the like) on device 100 may be reduced.

The predefined set of functions that may be performed exclusivelythrough a touch screen and/or a touchpad include navigation between userinterfaces. In some embodiments, the touchpad, when touched by the user,navigates device 100 to a main, home, or root menu from any userinterface that may be displayed on device 100. In such embodiments, thetouchpad may be referred to as a “menu button.” In some otherembodiments, the menu button may be a physical push button or otherphysical input control device instead of a touchpad.

FIG. 1B is a block diagram illustrating exemplary components for eventhandling in accordance with some embodiments. In some embodiments,memory 102 (in FIG. 1A) or 370 (FIG. 3) includes event sorter 170 (e.g.,in operating system 126) and a respective application 136-1 (e.g., anyof the aforementioned applications 137-151, 155, 380-390).

Event sorter 170 receives event information and determines theapplication 136-1 and application view 191 of application 136-1 to whichto deliver the event information. Event sorter 170 includes eventmonitor 171 and event dispatcher module 174. In some embodiments,application 136-1 includes application internal state 192, whichindicates the current application view(s) displayed on touch sensitivedisplay 112 when the application is active or executing. In someembodiments, device/global internal state 157 is used by event sorter170 to determine which application(s) is (are) currently active, andapplication internal state 192 is used by event sorter 170 to determineapplication views 191 to which to deliver event information.

In some embodiments, application internal state 192 includes additionalinformation, such as one or more of: resume information to be used whenapplication 136-1 resumes execution, user interface state informationthat indicates information being displayed or that is ready for displayby application 136-1, a state queue for enabling the user to go back toa prior state or view of application 136-1, and a redo/undo queue ofprevious actions taken by the user.

Event monitor 171 receives event information from peripherals interface118. Event information includes information about a sub-event (e.g., auser touch on touch sensitive display 112, as part of a multi-touchgesture). Peripherals interface 118 transmits information it receivesfrom I/O subsystem 106 or a sensor, such as proximity sensor 166,orientation sensor(s) 168, and/or microphone 113 (through audiocircuitry 110). Information that peripherals interface 118 receives fromI/O subsystem 106 includes information from touch-sensitive display 112or a touch-sensitive surface.

In some embodiments, event monitor 171 sends requests to the peripheralsinterface 118 at predetermined intervals. In response, peripheralsinterface 118 transmits event information. In other embodiments,peripheral interface 118 transmits event information only when there isa significant event (e.g., receiving an input above a predeterminednoise threshold and/or for more than a predetermined duration).

In some embodiments, event sorter 170 also includes a hit viewdetermination module 172 and/or an active event recognizer determinationmodule 173.

Hit view determination module 172 provides software procedures fordetermining where a sub-event has taken place within one or more views,when touch sensitive display 112 displays more than one view. Views aremade up of controls and other elements that a user can see on thedisplay.

Another aspect of the user interface associated with an application is aset of views, sometimes herein called application views or userinterface windows, in which information is displayed and touch-basedgestures occur. The application views (of a respective application) inwhich a touch is detected may correspond to programmatic levels within aprogrammatic or view hierarchy of the application. For example, thelowest level view in which a touch is detected may be called the hitview, and the set of events that are recognized as proper inputs may bedetermined based, at least in part, on the hit view of the initial touchthat begins a touch-based gesture.

Hit view determination module 172 receives information related tosub-events of a touch-based gesture. When an application has multipleviews organized in a hierarchy, hit view determination module 172identifies a hit view as the lowest view in the hierarchy which shouldhandle the sub-event. In most circumstances, the hit view is the lowestlevel view in which an initiating sub-event occurs (i.e., the firstsub-event in the sequence of sub-events that form an event or potentialevent). Once the hit view is identified by the hit view determinationmodule, the hit view typically receives all sub-events related to thesame touch or input source for which it was identified as the hit view.

Active event recognizer determination module 173 determines which viewor views within a view hierarchy should receive a particular sequence ofsub-events. In some embodiments, active event recognizer determinationmodule 173 determines that only the hit view should receive a particularsequence of sub-events. In other embodiments, active event recognizerdetermination module 173 determines that all views that include thephysical location of a sub-event are actively involved views, andtherefore determines that all actively involved views should receive aparticular sequence of sub-events. In other embodiments, even if touchsub-events were entirely confined to the area associated with oneparticular view, views higher in the hierarchy would still remain asactively involved views.

Event dispatcher module 174 dispatches the event information to an eventrecognizer (e.g., event recognizer 180). In embodiments including activeevent recognizer determination module 173, event dispatcher module 174delivers the event information to an event recognizer determined byactive event recognizer determination module 173. In some embodiments,event dispatcher module 174 stores in an event queue the eventinformation, which is retrieved by a respective event receiver module182.

In some embodiments, operating system 126 includes event sorter 170.Alternatively, application 136-1 includes event sorter 170. In yet otherembodiments, event sorter 170 is a stand-alone module, or a part ofanother module stored in memory 102, such as contact/motion module 130.

In some embodiments, application 136-1 includes multiple event handlers190 and one or more application views 191, each of which includesinstructions for handling touch events that occur within a respectiveview of the application's user interface. Each application view 191 ofthe application 136-1 includes one or more event recognizers 180.Typically, a respective application view 191 includes multiple eventrecognizers 180. In other embodiments, one or more of event recognizers180 are part of a separate module, such as a user interface kit (notshown) or a higher level object from which application 136-1 inheritsmethods and other properties. In some embodiments, a respective eventhandler 190 includes one or more of: data updater 176, object updater177, GUI updater 178, and/or event data 179 received from event sorter170. Event handler 190 may utilize or call data updater 176, objectupdater 177 or GUI updater 178 to update the application internal state192. Alternatively, one or more of the application views 191 includesone or more respective event handlers 190. Also, in some embodiments,one or more of data updater 176, object updater 177, and GUI updater 178are included in a respective application view 191.

A respective event recognizer 180 receives event information (e.g.,event data 179) from event sorter 170, and identifies an event from theevent information. Event recognizer 180 includes event receiver 182 andevent comparator 184. In some embodiments, event recognizer 180 alsoincludes at least a subset of: metadata 183, and event deliveryinstructions 188 (which may include sub-event delivery instructions).

Event receiver 182 receives event information from event sorter 170. Theevent information includes information about a sub-event, for example, atouch or a touch movement. Depending on the sub-event, the eventinformation also includes additional information, such as location ofthe sub-event. When the sub-event concerns motion of a touch the eventinformation may also include speed and direction of the sub-event. Insome embodiments, events include rotation of the device from oneorientation to another (e.g., from a portrait orientation to a landscapeorientation, or vice versa), and the event information includescorresponding information about the current orientation (also calleddevice attitude) of the device.

Event comparator 184 compares the event information to predefined eventor sub-event definitions and, based on the comparison, determines anevent or sub-event, or determines or updates the state of an event orsub-event. In some embodiments, event comparator 184 includes eventdefinitions 186. Event definitions 186 contain definitions of events(e.g., predefined sequences of sub-events), for example, event 1(187-1), event 2 (187-2), and others. In some embodiments, sub-events inan event 187 include, for example, touch begin, touch end, touchmovement, touch cancellation, and multiple touching. In one example, thedefinition for event 1 (187-1) is a double tap on a displayed object.The double tap, for example, includes a first touch (touch begin) on thedisplayed object for a predetermined phase, a first lift-off (touch end)for a predetermined phase, a second touch (touch begin) on the displayedobject for a predetermined phase, and a second lift-off (touch end) fora predetermined phase. In another example, the definition for event 2(187-2) is a dragging on a displayed object. The dragging, for example,includes a touch (or contact) on the displayed object for apredetermined phase, a movement of the touch across touch-sensitivedisplay 112, and lift-off of the touch (touch end). In some embodiments,the event also includes information for one or more associated eventhandlers 190.

In some embodiments, event definition 187 includes a definition of anevent for a respective user-interface object. In some embodiments, eventcomparator 184 performs a hit test to determine which user-interfaceobject is associated with a sub-event. For example, in an applicationview in which three user-interface objects are displayed ontouch-sensitive display 112, when a touch is detected on touch-sensitivedisplay 112, event comparator 184 performs a hit test to determine whichof the three user-interface objects is associated with the touch(sub-event). If each displayed object is associated with a respectiveevent handler 190, the event comparator uses the result of the hit testto determine which event handler 190 should be activated. For example,event comparator 184 selects an event handler associated with thesub-event and the object triggering the hit test.

In some embodiments, the definition for a respective event 187 alsoincludes delayed actions that delay delivery of the event informationuntil after it has been determined whether the sequence of sub-eventsdoes or does not correspond to the event recognizer's event type.

When a respective event recognizer 180 determines that the series ofsub-events do not match any of the events in event definitions 186, therespective event recognizer 180 enters an event impossible, eventfailed, or event ended state, after which it disregards subsequentsub-events of the touch-based gesture. In this situation, other eventrecognizers, if any, that remain active for the hit view continue totrack and process sub-events of an ongoing touch-based gesture.

In some embodiments, a respective event recognizer 180 includes metadata183 with configurable properties, flags, and/or lists that indicate howthe event delivery system should perform sub-event delivery to activelyinvolved event recognizers. In some embodiments, metadata 183 includesconfigurable properties, flags, and/or lists that indicate how eventrecognizers may interact with one another. In some embodiments, metadata183 includes configurable properties, flags, and/or lists that indicatewhether sub-events are delivered to varying levels in the view orprogrammatic hierarchy.

In some embodiments, a respective event recognizer 180 activates eventhandler 190 associated with an event when one or more particularsub-events of an event are recognized. In some embodiments, a respectiveevent recognizer 180 delivers event information associated with theevent to event handler 190. Activating an event handler 190 is distinctfrom sending (and deferred sending) sub-events to a respective hit view.In some embodiments, event recognizer 180 throws a flag associated withthe recognized event, and event handler 190 associated with the flagcatches the flag and performs a predefined process.

In some embodiments, event delivery instructions 188 include sub-eventdelivery instructions that deliver event information about a sub-eventwithout activating an event handler. Instead, the sub-event deliveryinstructions deliver event information to event handlers associated withthe series of sub-events or to actively involved views. Event handlersassociated with the series of sub-events or with actively involved viewsreceive the event information and perform a predetermined process.

In some embodiments, data updater 176 creates and updates data used inapplication 136-1. For example, data updater 176 updates the telephonenumber used in contacts module 137, or stores a video file used in videoplayer module 145. In some embodiments, object updater 177 creates andupdates objects used in application 136-1.

For example, object updater 176 creates a new user-interface object orupdates the position of a user-interface object. GUI updater 178 updatesthe GUI. For example, GUI updater 178 prepares display information andsends it to graphics module 132 for display on a touch-sensitivedisplay.

In some embodiments, event handler(s) 190 includes or has access to dataupdater 176, object updater 177, and GUI updater 178. In someembodiments, data updater 176, object updater 177, and GUI updater 178are included in a single module of a respective application 136-1 orapplication view 191. In other embodiments, they are included in two ormore software modules.

It shall be understood that the foregoing discussion regarding eventhandling of user touches on touch-sensitive displays also applies toother forms of user inputs to operate mobile devices 100 withinput-devices, not all of which are initiated on touch screens, e.g.,coordinating mouse movement and mouse button presses with or withoutsingle or multiple keyboard presses or holds, user movements taps,drags, scrolls, etc., on touch-pads, pen stylus inputs, movement of thedevice, oral instructions, detected eye movements, biometric inputs,and/or any combination thereof, which may be utilized as inputscorresponding to sub-events which define an event to be recognized.

FIG. 2 illustrates a portable mobile device 100 having a touch screen112 in accordance with some embodiments. The touch screen may displayone or more graphics within user interface (UI) 200. In this embodiment,as well as others described below, a user may select one or more of thegraphics by making a gesture on the graphics, for example, with one ormore fingers 202 (not drawn to scale in the figure) or one or morestyluses 203 (not drawn to scale in the figure). In some embodiments,selection of one or more graphics occurs when the user breaks contactwith the one or more graphics. In some embodiments, the gesture mayinclude one or more taps, one or more swipes (from left to right, rightto left, upward and/or downward) and/or a rolling of a finger (fromright to left, left to right, upward and/or downward) that has madecontact with device 100. In some embodiments, inadvertent contact with agraphic may not select the graphic. For example, a swipe gesture thatsweeps over an application icon may not select the correspondingapplication when the gesture corresponding to selection is a tap.

Device 100 may also include one or more physical buttons, such as “home”or menu button 204. As described previously, menu button 204 may be usedto navigate to any application 136 in a set of applications that may beexecuted on device 100. Alternatively, in some embodiments, the menubutton is implemented as a soft key in a GUI displayed on touch screen112.

In one embodiment, device 100 includes touch screen 112, menu button204, push button 206 for powering the device on/off and locking thedevice, volume adjustment button(s) 208, Subscriber Identity Module(SIM) card slot 210, head set jack 212, and docking/charging externalport 124. Push button 206 may be used to turn the power on/off on thedevice by depressing the button and holding the button in the depressedstate for a predefined time interval; to lock the device by depressingthe button and releasing the button before the predefined time intervalhas elapsed; and/or to unlock the device or initiate an unlock process.In an alternative embodiment, device 100 also may accept verbal inputfor activation or deactivation of some functions through microphone 113.

It should be noted that, although many of the following examples will begiven with reference to inputs on touch screen 112 (where the touchsensitive surface and the display are combined), a touch-sensitivesurface that is separate from the display may be used instead of touchscreen 112.

Map Service Operating Environment

Various embodiments of a map tool may operate within a map serviceoperating environment. FIG. 3 illustrates a map service operatingenvironment, according to some embodiments. A map service 380 mayprovide map services for one or more client devices 352 a-352 c incommunication with the map service 380 through various communicationmethods and protocols. A map service 380 generally may provide mapinformation and other map-related data, such as two-dimensional mapimage data (e.g., aerial view of roads utilizing satellite imagery),three-dimensional map image data (e.g., traversable map withthree-dimensional features, such as buildings), route and directioncalculation (e.g., ferry route calculations or directions between twopoints for a pedestrian), real-time navigation data (e.g., turn-by-turnvisual navigation data in two or three dimensions), location data (e.g.,where is the client device currently located), and other geographic data(e.g., wireless network coverage, weather, traffic information, ornearby points-of-interest). In various embodiments, the map service datamay include localized labels for different countries or regions;localized labels may be utilized to present map labels (e.g., streetnames, city names, points of interest) in different languages on clientdevices. Client devices 352 a-352 c may utilize these map services byobtaining map service data. Client devices 352 a-352 c may implementvarious techniques to process map service data. Client devices 352 a-352c may then provide map services to various entities, including, but notlimited to, users, internal software or hardware modules, and/or othersystems or devices external to the client devices 352 a-352 c.

In some embodiments, a map service may be implemented by one or morenodes in a distributed computing system. Each node may be assigned oneor more services or components of a map service. Some nodes may beassigned the same map service or component of a map service. A loadbalancing node may distribute access or requests to other nodes within amap service. In some embodiments a map service may be implemented as asingle system, such as a single server. Different modules or hardwaredevices within a server may implement one or more of the variousservices provided by a map service.

A map service may provide map services by generating map service data invarious formats. In some embodiments, one format of map service data maybe map image data. Map image data may provide image data to a clientdevice so that the client device may process the image data (e.g.,rendering and/or displaying the image data as a two-dimensional orthree-dimensional map). Map image data, whether in two or threedimensions, may specify one or more map tiles. A map tile may be aportion of a larger map image. Assembling together the map tiles of amap may produce the original map. Tiles may be generated from map imagedata, routing or navigation data, or any other map service data. In someembodiments map tiles may be raster-based map tiles, with tile sizesranging from any size both larger and smaller than a commonly-used 256pixel by 256 pixel tile. Raster-based map tiles may be encoded in anynumber of standard digital image representations including, but notlimited to, Bitmap (.bmp), Graphics Interchange Format (.gif), JointPhotographic Experts Group (.jpg, .jpeg, etc.), Portable NetworksGraphic (.png), or Tagged Image File Format (.tiff). In someembodiments, map tiles may be vector-based map tiles, encoded usingvector graphics, including, but not limited to, Scalable Vector Graphics(.svg) or a Drawing File (.drw). Embodiments may also include tiles witha combination of vector and raster data. Metadata or other informationpertaining to the map tile may also be included within or along with amap tile, providing further map service data to a client device. Invarious embodiments, a map tile may be encoded for transport utilizingvarious standards and/or protocols, some of which are described inexamples below.

In various embodiments, map tiles may be constructed from image data ofdifferent resolutions depending on zoom level. For instance, for lowzoom level (e.g., world or globe view), the resolution of map or imagedata need not be as high relative to the resolution at a high zoom level(e.g., city or street level). For example, when in a globe view, theremay be no need to render street level artifacts as such objects would beso small as to be negligible in many cases.

A map service may perform various techniques to analyze a map tilebefore encoding the tile for transport. This analysis may optimize mapservice performance for both client devices and a map service. In someembodiments map tiles may be analyzed for complexity, according tovector-based graphic techniques, and constructed utilizing complex andnon-complex layers. Map tiles may also be analyzed for common image dataor patterns that may be rendered as image textures and constructed byrelying on image masks. In some embodiments, raster-based image data ina map tile may contain certain mask values, which are associated withone or more textures. Embodiments may also analyze map tiles forspecified features that may be associated with certain map styles thatcontain style identifiers.

Other map services may generate map service data relying upon variousdata formats separate from a map tile. For example, map services thatprovide location data may utilize data formats conforming to locationservice protocols, such as, but not limited to, Radio Resource Locationservices Protocol (RRLP), TIA 801 for Code Division Multiple Access(CDMA), Radio Resource Control (RRC) position protocol, or LTEPositioning Protocol (LPP). Embodiments may also receive or request datafrom client devices identifying device capabilities or attributes (e.g.,hardware specifications or operating system version) or communicationcapabilities (e.g., device communication bandwidth as determined bywireless signal strength or wire or wireless network type).

A map service may obtain map service data from internal or externalsources. For example, satellite imagery used in map image data may beobtained from external services, or internal systems, storage devices,or nodes. Other examples may include, but are not limited to, GPSassistance servers, wireless network coverage databases, business orpersonal directories, weather data, government information (e.g.,construction updates or road name changes), or traffic reports. Someembodiments of a map service may update map service data (e.g., wirelessnetwork coverage) for analyzing future requests from client devices.

Various embodiments of a map service may respond to client devicerequests for map services. These requests may be a request for aspecific map or portion of a map. Embodiments may format requests for amap as requests for certain map tiles. In some embodiments, requests mayalso supply the map service with starting locations (or currentlocations) and destination locations for a route calculation. A clientdevice may also request map service rendering information, such as maptextures or stylesheets. In at least some embodiments, requests may alsobe one of a series of requests implementing turn-by-turn navigation.Requests for other geographic data may include, but are not limited to,current location, wireless network coverage, weather, trafficinformation, or nearby points-of-interest.

A map service may, in some embodiments, may analyze client devicerequests to optimize a device or map service operation. For example, amap service may recognize that the location of a client device is in anarea of poor communications (e.g., weak wireless signal) and send moremap service data to supply a client device in the event of loss incommunication or send instructions to utilize different client hardware(e.g., orientation sensors) or software (e.g., utilize wireless locationservices or Wi-Fi positioning instead of GPS-based services). In anotherexample, a map service may analyze a client device request forvector-based map image data and determine that raster-based map databetter optimizes the map image data according to the image's complexity.Embodiments of other map services may perform similar analysis on clientdevice requests and as such the above examples are not intended to belimiting.

Various embodiments of client devices (e.g., client devices 352 a-352 c)may be implemented on different device types. Examples of aportable-mobile device include the devices illustrated in FIGS. 1through 3 and 9, such as mobile device 100 and mobile device 300. Clientdevices 352 a-352 c may utilize map service 380 through variouscommunication methods and protocols described below. In someembodiments, client devices 352 a-352 c may obtain map service data frommap service 380. Client devices 352 a-352 c may request or receive mapservice data. Client devices 352 a-352 c may then process map servicedata (e.g., render and/or display the data) and may send the data toanother software or hardware module on the device or to an externaldevice or system.

A client device may, according to some embodiments, implement techniquesto render and/or display maps. These maps may be requested or receivedin various formats, such as map tiles described above. A client devicemay render a map in two-dimensional or three-dimensional views. Someembodiments of a client device may display a rendered map and allow auser, system, or device providing input to manipulate a virtual camerain the map, changing the map display according to the virtual camera'sposition, orientation, and field-of-view. Various forms and inputdevices may be implemented to manipulate a virtual camera. In someembodiments, touch input, through certain single or combination gestures(e.g., touch-and-hold or a swipe) may manipulate the virtual camera.Other embodiments may allow manipulation of the device's physicallocation to manipulate a virtual camera. For example, a client devicemay be tilted up from its current position to manipulate the virtualcamera to rotate up. In another example, a client device may be tiltedforward from its current position to move the virtual camera forward.Other input devices to the client device may be implemented including,but not limited to, auditory input (e.g., spoken words), a physicalkeyboard, mouse, and/or a joystick.

Embodiments may provide various visual feedback to virtual cameramanipulations, such as displaying an animation of possible virtualcamera manipulations when transitioning from two-dimensional map viewsto three-dimensional map views. Embodiments may also allow input toselect a map feature or object (e.g., a building) and highlight theobject, producing a blur effect that maintains the virtual camera'sperception of three-dimensional space.

In some embodiments, a client device may implement a navigation system(e.g., turn-by-turn navigation). A navigation system provides directionsor route information, which may be displayed to a user. Embodiments of aclient device may request directions or a route calculation from a mapservice. A client device may receive map image data and route data froma map service. In some embodiments, a client device may implement aturn-by-turn navigation system, which provides real-time route anddirection information based upon location information and routeinformation received from a map service and/or other location system,such as Global Positioning Satellite (GPS). A client device may displaymap image data that reflects the current location of the client deviceand update the map image data in real-time. A navigation system mayprovide auditory or visual directions to follow a certain route.

A virtual camera may be implemented to manipulate navigation map dataaccording to some embodiments. Some embodiments of client devices mayallow the device to adjust the virtual camera display orientation tobias toward the route destination. Embodiments may also allow virtualcamera to navigation turns simulating the inertial motion of the virtualcamera.

Client devices may implement various techniques to utilize map servicedata from map service. Embodiments may implement some techniques tooptimize rendering of two-dimensional and three-dimensional map imagedata. In some embodiments, a client device may locally store renderinginformation. For example, a client may store a stylesheet which providesrendering directions for image data containing style identifiers. Inanother example, common image textures may be stored to decrease theamount of map image data transferred from a map service. Client devicesmay also implement various modeling techniques to render two-dimensionaland three-dimensional map image data, examples of which include, but arenot limited to: generating three-dimensional buildings out oftwo-dimensional building footprint data; modeling two-dimensional andthree-dimensional map objects to determine the client devicecommunication environment; generating models to determine whether maplabels are seen from a certain virtual camera position; and generatingmodels to smooth transitions between map image data. Some embodiments ofclient devices may also order or prioritize map service data in certaintechniques. For example, a client device may detect the motion orvelocity of a virtual camera, which if exceeding certain thresholdvalues, lower-detail image data will be loaded and rendered of certainareas. Other examples include: rendering vector-based curves as a seriesof points, preloading map image data for areas of poor communicationwith a map service, adapting textures based on display zoom level, orrendering map image data according to complexity.

In some embodiments, client devices may communicate utilizing variousdata formats separate from a map tile. For example, some client devicesmay implement Assisted Global Positioning Satellites (A-GPS) andcommunicate with location services that utilize data formats conformingto location service protocols, such as, but not limited to, RadioResource Location services Protocol (RRLP), TIA 801 for Code DivisionMultiple Access (CDMA), Radio Resource Control (RRC) position protocol,or LTE Positioning Protocol (LPP). Client devices may also receive GPSsignals directly. Embodiments may also send data, with or withoutsolicitation from a map service, identifying the client device'scapabilities or attributes (e.g., hardware specifications or operatingsystem version) or communication capabilities (e.g., devicecommunication bandwidth as determined by wireless signal strength orwire or wireless network type).

FIG. 3 illustrates one possible embodiment of an operating environment399 for a map service 380 and client devices 352 a-352 c. In someembodiments, devices 352 a, 352 b, and 352 c can communicate over one ormore wire or wireless networks 360. For example, wireless network 360,such as a cellular network, can communicate with a wide area network(WAN) 370, such as the Internet, by use of gateway 364. A gateway 364may provide a packet oriented mobile data service, such as GeneralPacket Radio Service (GPRS), or other mobile data service allowingwireless networks to transmit data to other networks, such as wide areanetwork 370. Likewise, access device 362 (e.g., IEEE 802.11g wirelessaccess device) can provide communication access to WAN 370. Devices 352a and 352 b can be any portable electronic or computing device capableof communicating with a map service, such as a portable mobile devicedescribed below with respect to FIGS. 1 to 3 and 9. Device 352 c can beany non-portable electronic or computing device capable of communicatingwith a map service, such as a system described below in FIG. 3.

In some embodiments, both voice and data communications can beestablished over wireless network 360 and access device 362. Forexample, device 352 a can place and receive phone calls (e.g., usingvoice over Internet Protocol (VoIP) protocols), send and receive e-mailmessages (e.g., using Simple Mail Transfer Protocol (SMTP) or PostOffice Protocol 3 (POP3)), and retrieve electronic documents and/orstreams, such as web pages, photographs, and videos, over wirelessnetwork 360, gateway 364, and WAN 370 (e.g., using Transmission ControlProtocol/Internet Protocol (TCP/IP) or User Datagram Protocol (UDP)).Likewise, in some implementations, devices 352 b and 352 c can place andreceive phone calls, send and receive e-mail messages, and retrieveelectronic documents over access device 362 and WAN 370. In variousembodiments, any of the illustrated client device may communicate withmap service 380 and/or other service(s) 382 using a persistentconnection established in accordance with one or more securityprotocols, such as the Secure Sockets Layer (SSL) protocol or theTransport Layer Security (TLS) protocol.

Devices 352 a and 352 b can also establish communications by othermeans. For example, wireless device 352 a can communicate with otherwireless devices (e.g., other devices 352 a or 352 b, cell phones) overthe wireless network 360. Likewise devices 352 a and 352 b can establishpeer-to-peer communications 392 (e.g., a personal area network) by useof one or more communication subsystems, such as Bluetooth®communication from Bluetooth Special Interest Group, Inc. of Kirkland,Wash. 352 c can also establish peer to peer communications with devices352 a or 352 b. (not pictured). Other communication protocols andtopologies can also be implemented. Devices 352 a and 352 b may alsoreceive Global Positioning Satellite (GPS) signals from GPS 390.

Devices 352 a, 352 b, and 352 c can communicate with map service 380over the one or more wire and/or wireless networks, 360 or 362. Forexample, map service 380 can provide a map service data to renderingdevices 352 a, 352 b, and 352 c. Map service 380 may also communicatewith other services 382 to obtain data to implement map services. Mapservice 380 and other services 382 may also receive GPS signals from GPS390.

In various embodiments, map service 380 and/or other service(s) 382 maybe configured to process search requests from any of client devices.Search requests may include but are not limited to queries for business,address, residential locations, points of interest, or some combinationthereof. Map service 380 and/or other service(s) 382 may be configuredto return results related to a variety of parameters including but notlimited to a location entered into an address bar or other text entryfield (including abbreviations and/or other shorthand notation), acurrent map view (e.g., user may be viewing one location on the mobiledevice while residing in another location), current location of the user(e.g., in cases where the current map view did not include searchresults), and the current route (if any). In various embodiments, theseparameters may affect the composition of the search results (and/or theordering of the search results) based on different priority weightings.In various embodiments, the search results that are returned may be asubset of results selected based on specific criteria include but notlimited to a quantity of times the search result (e.g., a particularpoint of interest) has been requested, a measure of quality associatedwith the search result (e.g., highest user or editorial review rating),and/or the volume of reviews for the search results (e.g., the number oftimes the search result has been review or rated).

In various embodiments, map service 380 and/or other service(s) 382 maybe configured to provide auto-complete search results that may bedisplayed on the client device, such as within the mapping application.For instance, auto-complete search results may populate a portion of thescreen as the user enters one or more search keywords on the mobiledevice. In some cases, this feature may save the user time as thedesired search result may be displayed before the user enters the fullsearch query. In various embodiments, the auto complete search resultsmay be search results found by the client on the client device (e.g.,bookmarks or contacts), search results found elsewhere (e.g., from theinternet) by map service 380 and/or other service(s) 382, and/or somecombination thereof. As is the case with commands, any of the searchqueries may be entered by the user via voice or through typing. Themobile device may be configured to display search results graphicallywithin any of the map display described herein. For instance, a pin orother graphical indicator may specify locations of search results aspoints of interest. In various embodiments, responsive to a userselection of one of these points of interest (e.g., a touch selection,such as a tap), the mobile device may be configured to displayadditional information about the selected point of interest includingbut not limited to ratings, reviews or review snippets, hours ofoperation, store status (e.g., open for business, permanently closed,etc.), and/or images of a storefront for the point of interest. Invarious embodiments, any of this information may be displayed on agraphical information card that is displayed in response to the user'sselection of the point of interest.

In various embodiments, map service 380 and/or other service(s) 382 mayprovide one or more feedback mechanisms to receive feedback from clientdevices 352 a-c. For instance, client devices may provide feedback onsearch results to map service 380 and/or other service(s) 382 (e.g.,feedback specifying ratings, reviews, temporary or permanent businessclosures, errors etc.); this feedback may be used to update informationabout points of interest in order to provide more accurate or moreup-to-date search results in the future. In some embodiments, mapservice 380 and/or other service(s) 382 may provide testing informationto the client device (e.g., an A/B test) to determine which searchresults are best. For instance, at random intervals, the client devicemay receive and present two search results to a user and allow the userto indicate the best result. The client device may report the testresults to map service 380 and/or other service(s) 382 to improve futuresearch results based on the chosen testing technique, such as an A/Btest technique in which a baseline control sample is compared to avariety of single-variable test samples in order to improve results.

Example Mapping Functionality

FIG. 3 illustrates another example of a mobile device that may implementa map tool in accord with the embodiments described, where the mobiledevice may be configured in a manner similar to the mobile devicedescribed above. In the illustrated embodiment, a mobile device 300includes a mapping application (e.g., map module 154 described above)that may be stored in one or more memories of mobile device 300 andexecuted on one or more processors of mobile device 300. As is the casefor the mobile device described above, mobile device 300 may include oneor more controls 302 for operating the mobile device. These controls mayinclude but are not limited to power controls for turning the device onand off, volume controls for adjusting the ear piece volume or thespeaker volume, menu controls for navigation functions of the device,and function controls for initiating one or more function or actions onthe device. Controls 302 may include hardware controls or softwarecontrols. For instance, the bottom left corner of electronic display 312includes a graphical representation of a control 312 that may beselected by a user, such as by way of touch in accordance with the touchscreen functionality described above.

Mobile device 300 may also include other components similar to thosedescribed above, such as a microphone 304, an earpiece 306 (e.g., aspeaker through which to convey audio representations of telephonecalls), an optical sensor 308, and/or a speaker 310. Each of thesecomponents may be configured in a similar manner to those like-namedcomponents of FIG. 2 described above. Furthermore, electronic display312 may be configured with touch screen capability, such as touch screen112 described above. In various embodiments, controls (e.g., on screencontrol(s) 302) may be utilized to perform any of a variety ofmap-related functions including but not limited to zoom in, zoom out,rotate screen, pan screen, toggle views (e.g., two-dimensions to threedimensions and vice versa), and/or another map related activity. Invarious embodiments, one or more gestures may be utilized to perform anyof the aforesaid map controls (with or without the use of an actualgraphical on-screen control). In one non-limiting example, a one figuregesture may be utilized to adjust the pitch within a three-dimensionalmap view.

As noted above, mobile device 300 includes a mapping application thatmay be stored in one or more memories of mobile device 300 and executedon one or more processors of mobile device 300. In the illustratedembodiment, the graphical representation of the mapping application mayinclude a map 314 of a geographic region. This map may be presented as atwo-dimensional map or a three-dimensional map, the selection of whichmay be specified through, e.g., a user-configurable parameter of themapping application. In some embodiments, the mobile device may togglebetween two-dimensional map or three-dimensional map views responsive toinput from any input component of the mobile device. In one non-limitingexample, input from orientation sensor(s) 168 may initiate thetransition from a two-dimensional map view to a three-dimensional map,and vice versa. For instance, one or more of orientation sensor(s) 168may detect a tilt (e.g., a user-initiated tilt) in the orientation ofthe mobile device and, in response, initiate the aforesaid toggling.

Map 314 may include a graphical position indicator 316, which mayrepresent the location of the mobile device within the geographic regionof the map. Generally position indicator 316 may represent the currentor real-time position of the mobile device, although it should beunderstood that in some cases there may exist some small amount oftemporal latency between the actual position of the mobile device andthe graphical representation of that location (e.g., position indicator316). This may occur, e.g., when the mobile device is in motion. Invarious embodiments, the mobile device may be configured to perform mapmatching including but not limited to aligning a sequence of observeduser positions with a road network on a digital map. In variousembodiments, the mobile device may be configured to perform a “snap to”function in which the graphical position indicator 316 is aligned onto aroadway when the user's position falls within in a specified thresholddistance of the roadway.

Furthermore, mobile device 300 may generally be operated by a user. Forexample, mobile device 300 may in some cases be a smartphone utilized byan individual to make phone calls, send text messages, browse theinternet, etc. As use of mobile device by an individual generallyimplies the individual is proximate to the mobile device (e.g., the usermay be holding the device in his or her hand), references herein to thelocation of the device and the location of the user may be considered tobe synonymous. However, it should be understood that in some cases theactual position of the mobile device and the user of that device maydiffer by some distance. For instance, the user may place his or hermobile device on a table of an outdoor café while sitting in a nearbychair. In this case, the position of the device and the position of theuser may differ by some small amount. In another example, mobile device300 may be mounted on a car dashboard (e.g., for use as a navigationdevice) while the user of the device sits nearby (e.g., in the driverseat of the car). In this case as well, the position of the device andthe position of the user may differ by some small amount. Despite thesesmall differences in position, generally the position of the mobiledevice and the position of the mobile device user may be considered tocoincide.

In various embodiments, the map 314 displayed by the mobile device mayinclude one or more roads (e.g., roads 318 a-b), buildings (notillustrated), terrain features (e.g., hills, mountains) (notillustrated), parks (not illustrated), water bodies (not illustrated),and/or any other item that may be conveyed by a map. In some cases, themap may also include other map or navigation information including butlimited to readouts from one or more of a directional compass, analtimeter, and/or a thermometer.

In various embodiments, the mapping application may be configured togenerate directions from an origination (e.g., an address or a user'scurrent position) to a destination (e.g., an address, landmark,bookmarked/saved location, or point of interest). For instance, anindication of the origination and/or destination may be input into themulti function device by the user. The mobile device may generate one ormore candidate routes between those two points. The mobile device mayselect one of those routes for display on the device. In other cases,multiple candidate routes may be presented to the user and the user mayselect a preferred route. In the illustrated embodiment, one route isillustrated as route 320. The route may also include turn-by-turndirections which may be presented to the user (in 2D or 3D), such as agraphical indication to perform a turn 322 a from road 318 a to road 318b. In some embodiments, this graphical indication to perform a turn maybe supplemented or substituted with an audible indication to turn, suchas a voice command from speaker 310 that indicates the user is to “turnleft in 100 yards,” for example. In some embodiments, the route that isselected may be presented to the user as a route overview. For instance,before proceeding with navigation, the mobile device may generate aroute overview display that graphically indicates key information forthe route, such as key turns, route distance and/or an estimated timefor traversing the route. In some cases, the mobile device may beconfigured to generate a display of driving maneuvers (e.g., turns, lanechanges, etc.) that occur in quick succession, either in the routeoverview or during actual navigation. This information may help the usersafely prepare for such maneuvers. In some cases, the route informationmay be presented in a list format, such as a list of turns or othermaneuvers.

In various embodiments, the mapping application of the mobile device maybe configured to track the position of the user over time andcorrespondingly adjust the graphical position indicator 316 to indicatethe new position. For instance, the mapping application may determinethat the user is traveling along route 320 from position information(e.g., information from GPS module 135) and update the map 314accordingly. For instance, in some cases the map 314 may remainstationary while position indicator 316 is moved along the route. Inother cases, position indicator 316 may remain stationary or “fixed”while map 314 is moved (e.g., panned, turned, etc.) around the positionindicator.

In various embodiments, the mobile device may be configured to displayalternate or contingency routes. In some cases, these routes may beselectable by the user (e.g., via the touch screen interface). In othercases, the mobile device may select a best route based on one or moreparameters, such as shortest distance or time. In some cases, theseparameters or preferences may be set by the user.

As described in more detail below, the mobile device may in variousembodiments receive routing information that specifies a route from amap service. In some case, the mobile device may carry out navigationguidance in accordance with this route. However, in some cases, themobile device may perform a reroute operation in order to generate a newroute to the destination. For instance, the user may have deviated fromthe original route or explicitly requested a new route. In some cases,the mobile device may perform rerouting based on cached map data storedon the mobile device.

In various embodiments, the mobile device may be configured to performroute correction based on real-time data, such as updates in mapinformation, road conditions, traffic conditions, and/or weatherconditions. For instance, the mobile device may be configured to alter aroute such that the route avoids a construction zone or a dangerousstorm cell.

In various embodiments, the mobile device may be configured to performlane guidance independently or as part of navigation guidance. Forinstance, the mobile device may, in response to detecting that multipleturns follow in quick succession, provide the user with a direction orsuggestion as to which lane to occupy. For instance, a voice or visualindication may specify that the user “turn right, then move to the leftlane” in anticipation of a subsequent left turn. In another example, themobile device may detect one or more lane closures (e.g., due toconstruction or other reasons) and instruct the user to avoid suchlanes.

In various embodiments, the mobile device may be configured to generatevoice prompts for directions. For instance, during navigation guidance,the mobile device may be configured to generate audio representations ofthe next turn or driving maneuver on the route. For instance, the mobiledevice may be configured to audibly indicate the user should “turn leftin 100 yards” or some other audible indication of a maneuver.

In various embodiments, the mobile device may be responsive to variousvoice commands for performing actions including a command to obtain aroute. For instance, the mobile device may interpret the user's voicethrough a microphone or other transducer of the mobile device. The usermay specify an origination and a destination for the requested route. Invarious embodiments, the mobile device may be configured to utilize theuser's current location as the origination for the route.

In various embodiments, the mobile device may be configured to perform asearch along a specific route, such as current navigation route. Forinstance, the user of the mobile device may request the location ofpoints of interest, such as fuel stations or restaurants. However, if auser is traveling along a particular route, they may not be particularlyinterested in points of interest that are not proximate to that route.As such, the mobile device may be configured to scope any searches topoints of interested within a specified distance away from the route. Invarious embodiments, this distance may be a configurable parameter.

In various embodiments, the mobile device may be configured to displayvarious graphical layers including but not limited to a graphical mapinformation, aerial images (e.g., plane, dirigible, helicopter-mountedcameras, satellite-acquired images), and/or traffic information. Forinstance, in the traffic information example, the mobile device mayoverlay color coded traffic information on roadways to indicate thespeed at which traffic is flowing. For example, green color coding maybe used to indicate traffic is flowing normally, and yellow or red maybe used to indicate traffic slowdowns.

In various embodiments, the mobile device may be configured to displayany quantity of metrics or statistics about a navigation route includingbut not limited to an estimated time of arrival, travel distanceremaining, average speed (overall or moving average), top speed, and/orother route statistics.

In various embodiments, the mobile device may be configured to displayroutes at different angles in order to accommodate the preferences ofdifferent users. Such viewing angles may include a birds eye view fortwo-dimensional maps to any of a variety of camera angles available fora three-dimensional map.

In various embodiments, the mobile device may be configured to providenavigation information other than map and routing information. Forinstance the mobile device may expose output from any of the hardwaredevice described above with respect to FIG. 1. In one non-limitingexample, an orientation sensor 168 may include a compass that outputsdirection data. The mobile device described herein may be configured todisplay this directional data as a virtual compass, for example.

Example Roof Analysis Tool

FIGS. 4A-4D are flowcharts depicting selected processing stages ofembodiments of a roof analysis tool operable on a server, such as mapservices 380 or other services 382. FIG. 4E is a flowchart depictingselected processing steps for an embodiments of a map tool, where themap tool is operable with a mapping application on a mobile device, andwhere the mapping application, as discussed above, may be invokedthrough the a user selecting the mapping application through theinterface of a mobile device 300. The mapping application may engage theservices of the map service operating system as described in regard toFIG. 3.

As per FIG. 4A, in some embodiments, a roof analysis tool, may accessfootprint data for one or more structures or buildings within a mapregion, as reflected in stage 402. In some cases, the footprint data maybe two-dimensional mapping data that may use a geodetic (latitude andlongitude) reference frame. In addition to the two-dimensional data, theroof analysis tool may have access to three-dimensional data set thatcorresponds to the same map region as corresponds to the two-dimensionaldata. In some cases the three-dimensional data may be vector-based meshdata composed of multiple triangles representative of various surfaceswithin the map region. From the three-dimensional data set correspondingto the map region and based on the footprint data for a structure of theone or more structures within the map region, the roof analysis tool mayidentify multiple points on a roof of a structure, as reflected in stage404.

For example, to identify the multiple points on the roof of the givenstructure, the roof analysis tool may correlate coordinates for a givenfootprint with coordinates within the mesh data in order to identify themesh data corresponding to the footprint. Once the mesh data for thefootprint is identified or extracted, the roof analysis tool maydetermine the highest points within the footprint, where the highestpoints are determined to be points on a roof of the structure with thegiven footprint. Further, the points may correspond to vertices oftriangles representing the roof of the structure.

The roof analysis tool may then calculate, based on the multiple pointson the roof of the structure, multiple groups of normals, as reflectedin stage 406. To identify the groups of normals, the roof analysis toolmay first calculate a normal for each of the points identified, wherethe normal is represented in three-dimensional Cartesian coordinates,and where the normal is perpendicular to the surface of the roof. Theroof analysis too may then transform the normal from three-dimensionalCartesian coordinates into spherical coordinates for a unit sphere. Theroof analysis tool may then repeat this process to generate a normal foreach of the points on the roof of the structure. Because a normalprojects perpendicularly out from the surface of the roof of thestructure, the normals for a plane for one plane of the roof should allbe pointing in roughly the same direction, accounting for some noise inthe three-dimensional data set.

Given the multiple calculated normals, the roof analysis tool maydetermine which groups of normals point in roughly the same direction.In this example, the roof analysis tool performs a Hough transformationon the normals as represented by their respective spherical coordinates.A result of the Hough transformation is a two-dimensional histogram,where one axis corresponds to the rho angle of the spherical coordinatesfor a normal and another axis corresponds to the psi angle of thespherical coordinates for the normal. In this example, the rho angleranges 180 degrees (−90 to +90 degrees) and the psi angle ranges from0-180. Using the two-dimensional histogram, the roof analysis tool mayidentify clusters, which correspond to groups of normals, and the roofanalysis tool may determine a normal for the group of normals based onan average normal of the cluster.

Using a respective average normal for a respective group of normals, theroof analysis tool may iterate over each of normals and determine towhich of the average normals the current normal being considered isclosest to, and the roof analysis tool may then classify that currentlyconsidered normal as part of a group of normals that correspond to theaverage normal which is closest to the currently considered normal.

Based on the average normal for the cluster, the roof analysis tool maydetermine the plane corresponding to the average normal, and where thecorresponding plane is identified or determined to be a plane of theroof of the structure, as reflected in stage 408. The roof analysis toolmay repeat the identification of planes in order to identify each of theplanes corresponding to the planes of the roof of the structure.

Once each plane for the roof of the structure has been determined, theroof analysis tool may determine a parameter set for the roof of thestructure based on parameter values describing each of the respectiveplanes of the roof, as reflected in stage 410.

In some embodiments, the roof analysis tool may provide the parameterset describing each of the planes in a roof of a structure to a mobiledevice for the purpose of generating a three-dimensional map view thatincludes a rendering of the structure and the roof of the structure. Inthis example, the roof would be highly correlated to the actual shape ofthe actual structure within the map region.

In other embodiments, the roof analysis tool may instead use theparameter set describing a roof of the building to identify anarchetypal roof style that may be similar to the actual shape of the ofthe actual structure within the map region. In other words, for a givenarchetypal roof style, say a hip and valley roof style, there may bemany different shapes and arrangements of planes of a roof that wouldcorrespond to the archetypal roof style. Variations may be in the anglesof the component planes of the roof, or in the length of one of thesections of the roof, among other variations. However, if the map viewfor the map region includes a rendering of a roof for a structure wherethe roof is of the same archetypal roof style as the actual structure,then the map view will bear a strong semblance of verisimilitude to thereal world. In other words, the rendered roof in the map view, while notan exact match to the real world structure's roof, will be similar tothe real world structure's roof.

To enable the embodiment of the roof analysis tool that provides anarchetypal roof style for a building to a mobile device, the server mayfirst provide the mobile device with a list of archetypal roof stylesand with dimensions or parameters for how to render a given archetypalroof style in addition to an identification value for each of thearchetypal roof styles. In this way, once the mobile device and theserver implementing the roof analysis tool are synchronized, the mobiledevice may simply receive an archetypal identification value andidentifying information for the building to which the archetypalidentification value corresponds in order to determine which style ofroof to render on top of a given building.

As per FIG. 4B, in some embodiments, a roof analysis tool, may accessfootprint data for one or more structures or buildings within a mapregion, as reflected in stage 422. In addition to the two-dimensionalfootprint data, the roof analysis tool may have access tothree-dimensional data set that corresponds to the same map region asthe two-dimensional data. From the three-dimensional data setcorresponding to the map region and based on the footprint data for astructure of one or more structures within the map region, the roofanalysis tool may identify multiple points on a roof of the structure,as reflected in stage 424.

The roof analysis tool may then calculate, based on the multiple pointson the roof of the structure, multiple groups of normals, as reflectedin stage 426. To identify the groups of normals, the roof analysis toolmay first calculate a normal for each of the points identified, wherethe normal is represented in three-dimensional Cartesian coordinates,and where the normal is perpendicular to the surface of the roof. Theroof analysis too may then transform the normal from three-dimensionalCartesian coordinates into spherical coordinates for a unit sphere. Theroof analysis tool may then repeat this process to generate a normal foreach of the points on the roof of the structure. Given each normalrepresented in spherical coordinates, the roof analysis tool may apply atransformation to the spherical coordinates of the normals in order togenerate a two-dimensional histogram. From the two-dimensionalhistogram, the roof analysis tool may identify clusters of normals. Insome embodiments, the roof analysis tool may, instead of sphericalcoordinates, use another coordinate system with which to perform each ofthe calculations described herein.

Based on the multiple calculated normals, the roof analysis tool mayidentify a roof type classification for the structure, as reflected instage 428. The roof analysis tool may determine the roof typeclassification for the structure based on the orientation of each of thepanes of the roof. In other words, if the clusters of normals correspondto two planes, and where the average normal of one plane is, forexample, 100 degrees from the average normal of the second plane, thenthe roof analysis tool may determine that the roof type is a gable typeroof, such as gable roof 708 in FIG. 7. In this example, a gable typeroof may be determined from a range of degrees between the normals oftwo intersecting planes, such as 30 degrees to 130 degrees. Other rangesmay be defined for classifying a gable type roof. Similarly, each of thearchetypal roofs may be defined within tolerance factors for either thenumber of planes in the archetypal roof, or the angles at which theplanes or normals for the planes intersect. In this example, the roofanalysis tool may determine that the roof type classification for theroof of the structure in the map region is a gable type roof.

As per FIG. 4C, in some embodiments, a roof analysis tool, may receive,for a map region, three-dimensional mapping data including multipletriangles representing respective surface regions for one or moreobjects in the map region, as reflected in stage 442. From thethree-dimensional mapping data, the roof analysis tool may identify asubset of all the triangles in the mapping data, where the subset oftriangles correspond to a roof for a building in the map region, asreflected in stage 444. In some cases, the subset of triangles may bedetermined by correlating a coordinates for a footprint for the buildingwith a corresponding area within the mapping data for the coordinatesfor the footprint. In some cases, the footprint data may be determinedfrom two-dimensional mapping information corresponding to the same or atleast an overlapping map region as for the three-dimensional mappingdata. In some cases, the map region may be received from a mobile devicerequesting a compact data representation, or a parameterized set ofvalues describing roofs for buildings in the map region.

The roof analysis tool may then calculate a normal for a surface of atriangle within the subset of triangles, where the normal is representedas a vector in three-dimensional Cartesian coordinates, as reflected instage 446. The roof analysis tool may then transform thethree-dimensional Cartesian coordinates for the calculated normal forthe surface of the triangle into spherical coordinates for a unitsphere, as reflected in stage 448.

A problem that may arise when performing a Hough transformation onspherical coordinates for a flat roof is that the azimuth angles mayrange anywhere from 0-360 degrees due to noise in the three-dimensionalmapping data. For example, for a flat roof, if the surface of thetriangle on the roof is anything but perfectly perpendicular to thesurface of the earth, then the slight degree of the normal from theperpendicular may exist in any direction. Therefore, to eliminate therange of azimuth angles in the spherical coordinates for the normal thatare due to a range of z-axis values in the three-dimensional Cartesiancoordinates for the normal, the roof analysis tool may transform thethree-dimensional Cartesian coordinates of the normal into rho angle andpsi angle parameters instead of theta angle and phi angle parameters, asreflected in stage 450. Examples of the rho and psi angles for anexample normal may be seen in FIG. 6E, and rho angle 649 a and psi angle649 b. Further, because roof normal directions point upward, and in therho-psi parameterization, the range of the rho angle is limited to −90and +90 degrees, and the range of the psi angle is 0-180 degrees.

The roof analysis tool may similarly process each of the remainingnormals, and determine an archetypal roof classification based ongroupings of normals as discussed above for FIG. 4B.

As per FIG. 4D, the roof analysis tool may identify, from athree-dimensional data set corresponding to a map region, multiplepoints on a roof of a structure within the map region, as reflected instage 462. The roof analysis tool may determine the points on the roofof the structure in any of the methods discussed for other embodiments.The roof analysis tool may then calculate, based on the multiple pointson the roof structure, multiple respective normals that areperpendicular to the roof of the structure, as reflected in stage 464,where the normal vector points away from the roof toward the sky.

The roof analysis tool may then cluster the multiple normals intomultiple groups of normals, as reflected in stage 466. The clusteringmay be performed as discussed above in regard to FIG. 4A. For eachrespective group of normals within the multiple groups of normals, theroof analysis tool may identify a respective plane of the roof of thestructure, as reflected in stage 468. For example, FIG. 6F illustratesseveral differently oriented flat roof surfaces that correspond to thenormals illustrated in FIG. 6D, where the group of normals 630corresponds to plane 650, and where group of normals 638 corresponds toplane 652. Further, in general, because of noise in thethree-dimensional mesh data, there may be overlap between the planes, asillustrated in FIG. 6F.

Once each of the planes for a roof have been determined, for example, bydetermining three or more three-dimensional Cartesian coordinate points,one point for each corner of the plane, the roof analysis tool mayidentify a classification for a roof type, as reflected in stage 470.Further, the roof analysis tool may perform the identification of theclassification of a roof type based on each of the respective planesdetermined to be part of the roof of the building. Example archetypalroof styles are depicted in FIG. 7 and hip and valley roof 702, gambrelroof 704, hip roof 706, gable roof 708, mansard roof 710, flat roof 712,and shed roof 714. However, this list of roof types is non-exhaustive,and a server implementing a roof analysis tool and a mobile device incommunication with the server may synchronize on a common list ofarchetypal roofs that may include more or fewer than these seven exampleroof types.

Example Mobile Device Map Tool

As per FIG. 4E, and with regard to a mobile device such as mobile device300, a map tool on the mobile device may display a three-dimensionalview of a map, where the map tool bases the three-dimensional view on athree-dimensional model constructed from one or more data sets withmapping information corresponding to the map. The constructedthree-dimensional model may include representations for buildings in themap region, as reflected in stage 482.

In some embodiments, the map tool on the mobile device may generate thethree-dimensional model for all elements in a map region except forbuildings. In this embodiment, when the map tool requests roofinformation from a server, the server provides the roof parameters for agiven structure along with a height value for the structure. From thisinformation for the structure, the map tool may render a building at theindicated height value, and with the indicated roof type, and with abuilding perimeter shape that matches the roof type perimeter in caseswhere the roof type information includes parameters for the shape of theroof. In cases where the parameters for the roof simply indicate astyle, the shape of the building may be defined to match the footprintfor the building, and a roof style matching the shape of the building isgenerated from the roof type classification.

However, for the embodiment where the map tool generates athree-dimensional model, the representations of the buildings in the mapregion for the three-dimensional model may only be extruded polygons,where the tops of the polygons are flat. Map view 500 in FIG. 5A is anexample map view based on raster image data for a map region, and mapview 502 in FIG. 5B is an example map view based on a constructedthree-dimensional model of the same map region. Further, in map view502, each of the buildings is an extruded polygon with a flat roof.However, not all of the actual roofs of the buildings corresponding tothe extruded polygons have flat roofs.

To render a version of map view 502, but with roofs that approximate theroofs of the actual corresponding buildings, the mobile device mayrequest and then receive, from a server implementing a roof analysistool, a roof type classification corresponding to the buildings in themap region, as reflected in stage 484.

Based a roof type classification for a given building in the map andbased on the three-dimensional model that includes a representation ofthe given building, the map tool on the mobile device may render a mapview that has a rendered roof based on a respective roof typeclassification from among a list of multiple roof type classifications,as reflected in stage 486. For example, building 504 has a correspondingbuilding in map view 500 that has a gable type roof; however, in mapview 502, building 504 has a flat roof.

From the received roof type classifications from the server, the maptool on the mobile device may determine that building 504 corresponds toa gable type roof, where building 504 may be identified by coordinateswithin the map region and with an identification value for a roof type.Given only the parameter values that identify the building and thatidentify the roof type, the map tool on the mobile device may render agable type roof for a more accurate map view of the map region.

In some embodiments, instead of the server providing the map tool on themobile device with parameters identifying a building and a roof typecorresponding to the building, the roof analysis tool on the server mayprovide the map tool with parameters describing the coordinates ofvarious planes making up the roof for the building. For example, for thesame building 504, the roof analysis tool on the server may provide themap tool on the mobile device with parameters including coordinates forthe two planes of the gable roof. In this way, while still providing acompact parameterization of a roof because only coordinate values aretransmitted, the map tool on the mobile device may render a roof forbuilding 504 that is more accurate. The increased accuracy is becausethe pitch of the roof is reflected in the coordinates for the two planeswhereas in the transmission of a roof classification type, the map toolmay render a similar type roof for different buildings with the sametype of roof even though the different buildings may have roofs withdifferent pitches.

In some embodiments, the map tool on the mobile device may be designedto perform the functions described above in the various embodiments of aroof analysis tool. In other words, the use of the server by the maptool to provide roof parameters may provide increased responsiveness bythe map tool because the server performs the calculations to identifythe roof parameters, but the map tool may be capable of performing thesame calculations.

In some embodiments, the map tool may simply assign random non-flat rooftypes to various buildings within a map view that have beenclassified/parameterized as being non-flat by the roof analysis tool inorder to provide a better semblance of reality as compared to a map viewincluding only flat roofs. In other cases, the map tool may randomlyselect a roof type from a list of roofs that correspond to particularzoning information. For example, for a residential zoning area, the maptool may randomly select a roof type for a building from among, forexample, hip and valley, hip, or gable type roofs. However, for acommercially zoned area, the map tool may randomly select a roof typefor a building from among, for example, flat, shed, or gable type roofs.

In some cases, the map tool may generate a three-dimensional model usingelements from a two-dimensional data set of mapping information and froma three-dimensional data set of mapping information. For example,two-dimensional maps specifying locations and boundaries of variousstructures may be available to define the footprint of a given object orstructure in a map area. In this example, three-dimensional mesh datacorresponding to the map area may also be available, where within thehighly-detailed set of data is information regarding heights of objectsfor a given location within the map area. The map tool may use thefootprint for an object derived from the two-dimensional mappinginformation and extrude, or extend, the footprint into three-dimensionalspace using one or more height values, where the one or more heightvalues correspond to one or more points within the footprint. In somecases, the height values are determined from three-dimensional mappinginformation. This process may be repeated for each object footprint inthe map area, and once each object has been similarly processed, theresult is a model of a three-dimensional space for the map area derivedfrom multiple data sets from which a map view may be rendered.

An aspect of the three-dimensional model constructed from the two datasets is that the model may not accurately represent the shape of a givenbuilding. For example, if for a given footprint a single point in thecenter of the footprint were correlated to the corresponding point inthe three-dimensional mapping information, the footprint for the objectmay be extruded to the height of the point. However, it may be the casethat the top of the object may not be flat. In other words, if a givenobject has anything but a flat top, there may be multiple height valuescorresponding to different points within the object footprint. Tocompensate for the potential inaccuracy, the map tool may, in somecases, use multiple points to determine a height, or in some cases,determine multiple height values. While the constructed model may lacksome accuracy, what is gained is a decrease in computational complexity.

In some embodiments, the map tool may generate a three-dimensional modelusing footprint data from a two-dimensional data set and a height valuecorresponding to the footprint. For example, the map tool may receivemapping information that includes coordinates for various footprints ofvarious structures within a map region, and the mapping information mayalso include a single height value corresponding to each footprint. Inthis way, the map tool may, for each footprint in a map region, extrudea respective footprint within the map region according to a respectiveheight value for the respective footprint. Once each footprint has beenextruded, the map tool may render a three-dimensional map viewrepresenting the map region, where the three-dimensional map view isbased on the extruded footprints within the map region.

Mobile devices may provide a user with map navigation that includes athree-dimensional view corresponding to a current position. In somecases, the three-dimensional view may be constructed based on GlobalPositioning System (GPS) data, map information from other sources, orbased on GPS data combined with map information from other sources. Insome cases, a map view may be constructed from map informationcorresponding to a given address or to some other piece of informationfrom which location information may be derived. For example, from anypoint on earth, a user may give a voice command to the map tool, such as“show me the front of the Metropolitan Museum of Art in New York City.”In response to the voice command, the map tool, may access mapinformation for the location of the Metropolitan Museum of Art in NewYork City and generate a map view to the user.

However, a map view presented to a user through a traditional mappingapplication on a mobile device may present a user with photographicdetail of the surrounding environment. In some cases, the map view mayinclude cars, buses, bicycles, bicycle riders, pedestrians, and otherrandom objects, signs, or advertisements. A result may be a clutteredmap view that may decrease the efficiency with which a user may navigatethrough the map area. Therefore, it may be beneficial, or moreproductive, for a user to have the option to see a simplified version ofthe surrounding environment so that information such as street names orprominent houses are more clearly conveyed. For example, a user mayselect a configuration setting to display, within a map view of a mapapplication, an isometric view of structures drawn without texturing, orwithout any objects that are not structures. In some cases, a simplifiedmap view may be a default setting, requiring no action from a user toenable.

In some embodiments, the map view provides a user with a bird's eyevirtual camera view with photographic detail of the surroundingenvironment. In other embodiments, the map view provides a user withground level virtual camera view from the perspective of the user'slocation within the displayed map area. In other embodiments, a user maychoose the virtual camera perspective location from which the map viewmay be generated.

In some cases, the map view may be composed of various geometric figuresand may be considered a low resolution proxy of the actual, or highresolution version of the surrounding environment. In either the bird'seye view, ground level view, or the isometric view of geometric figures,the map tool may use one or more sources of map information to constructthe map view. In some cases, a data source containing of two-dimensionalinformation may be combined with another data source containingthree-dimensional information in order to generate a three-dimensionalmap view. In other cases, a three-dimensional source of mappinginformation alone may serve as a basis on which to construct athree-dimensional model of the surrounding environment.

In some cases, a user may manipulate a given map view such as throughinput indicating to the map tool to display a different virtual cameraperspective of the map view. For example, within a given map view, auser may wish to see the map view from the other side of a building.However, given that the previously generated model of the map view hasalready been constructed, the map tool does not need to generate a new3D model of the map view because the locations and spatial dimensions ofobject in the previously generated model remain valid for the newvirtual camera perspective.

In an embodiment, three-dimensional (3D) data may be 3D mesh data, whichmay contain data defining the location and orientation of thousands oftriangles for a given map view. Further in this embodiment,two-dimensional (2D) data may be obtained from maps for a given city orcounty which define the locations and the dimensions of footprints forstructures, roads, sidewalks, plazas, or other objects. In thisembodiment, in the interest of speed and computational complexity, a 3Dproxy may be constructed through the transformation of the 2D model intoa 3D model using selected pieces of information from the 3D model toenhance the 2D model. For example, if the 2D model provides informationregarding the footprint of a given building, the map tool may thenreference the 3D model to identify the corresponding location of thefootprint of the building. Once the location of the footprint of thebuilding is determined in the 3D model, one or more height values may beextracted from the 3D model for the building. Now, given the footprintof the building and the one or more height values, a rough box orpolygon may be extruded to one of the height values, or to some valuederived from the height values in order to generate an approximate 3Dshape. This process may be repeated for each object in the 2D data,thereby creating a rough, low-resolution version of the surroundingenvironment.

In some embodiments, a single source of data may be used, for example,the 3D mesh data for the surrounding environment. In this example, atwo-dimensional grid may be created, where each grid segment may beextruded based on a height value from the 3D mesh data, where the heightvalue from the 3D mesh data is for a location corresponding to the gridsegment. In the case where a given object in the map space overlaps withmultiple grid segments, the display of adjacent grid segments may besmoothed into a contiguous three-dimensional object. In this way, a 3Dmodel of the map space may be constructed using only height valuesextracted from the 3D mesh data.

In different embodiments, the map tool may adjust the granularity of theconstructed 3D model based on various factors. For example, a user maychoose a configuration setting to display different levels of detail inthe 3D model, and in response, the map tool may construct the 3D modelusing additional information from the one or more source data sets ofmapping information.

In some embodiments, a map tool on a mobile device, given multiple datasets of mapping information corresponding to a map or map area, mayconstruct a three-dimensional model on which to base a map view todisplay. The map tool may receive two or more data sets of mappinginformation corresponding to a map region. In some cases, the mappinginformation is vector data and not raster image data.

Based on the received two or more data sets of mapping information, themap tool may determine one or more spatial dimensions for one or moreobjects in the map region. For example, the map tool may receivethree-dimensional mapping information for the map region from MapService 380 or from GPS 390. The map tool may also receive, from MapService 380 or service 382 for example, two-dimensional mappinginformation that includes footprint information for buildings within themap region for which the three-dimensional mapping informationcorresponds. Further, the footprint may be the footprint of any objectwithin the map region.

Given a footprint and the area of the map region in which the footprintexists, and given three-dimensional information corresponding to the mapregion, the map tool may determine one or more height values for thefootprint. The map tool may use one or more points within the footprint,or points proximate to the footprint, and correlate the one or morepoints to respective one or more height values from thethree-dimensional mapping information, where each respective heightvalue corresponds to a respective point. In this way, the map tool maydetermine a height value for each of the points in the footprint. Aresult is that the map tool, based on two different data sets of mappinginformation, determines one or more spatial dimensions for one or moreobjects in the map region. In this example, spatial dimensions aredetermined from the two-dimensional mapping information (footprints) andspatial dimensions are determined from the three-dimensional mappinginformation (height values).

In some embodiments, a footprint may be divided into multiple regions,and height values may be correlated to the three-dimensional informationfor one or more locations within each of the regions. For example, abuilding may be L-shaped, where one leg of the L is not as tall as theother leg of the L. In this case, the footprint may be divided into tworegions, one region corresponding to each leg of the L, and a heightvalue for each region may be used as the basis for extruding thefootprint into three dimensional space. The regions of the footprint maybe determined in other manners, such as uniform division of thefootprint into any given number of regions, for example, dividing eachfootprint into quarters.

Once the map tool has identified one or more height values correspondingto one or more points in a given footprint, the map tool may generate athree-dimensional version of the footprint. The map tool may generate anentire three-dimensional model based on the three-dimensional versionsof each object footprint in the map region. For example, the map toolmay extrude or extend the object footprint into three-dimensional spacebased on the height value. The generated three-dimensional model has ahigher level of granularity than the two-dimensional mapping informationin that the three-dimensional model includes height values in additionto the footprint information. The generated three-dimensional model alsohas a lower level of granularity than the three-dimensional mappinginformation in that the three-dimensional model does not have as muchdetail regarding the dimensions of objects within the map region. Inother words, in this example, the generated three-dimensional model hasa different level of granularity from each of the sets of mappinginformation on which the three-dimensional model is based.

The generated three-dimensional model may then serve as the basis forthe generation of a display of the map area such as the map view in FIG.5A. In some cases, the three-dimensional model may be augmented toinclude additional details, such as texture and shading for one or moreobjects within the three-dimensional model, or doors or windows oroutlines of doors or windows. The additional details may be extractedfrom the mapping information already used, or the additional details maybe based on another source of mapping information. For example, the maptool may use the cardinal direction of the user with respect to thecurrent position of the sun to add accurate shading information toobjects within the three-dimensional model. In other cases, the map toolmay access a default settings file to apply default textures to variousobjects such as buildings or streets.

As discussed above, a simplified map view may provide a user with a moreefficient map using experience. Overall, without distractions such asadvertisements, vehicles, or people, the simplified map view is easierto comprehend and easier to navigate.

FIGS. 5A and 5B depict two versions of a map view of the same map areaas depicted within screen area 312 of a mobile device. FIG. 5A depicts arendering of three-dimensional digital surface model mesh data that wasthen “skinned” with rasterized texture data that was captured at thesame time as the three-dimensional mesh. The depiction in FIG. 5A may befrom a raster image taken, for example, from a satellite or helicopter.The photographic detail may provide a user with a general impression ofthe map area. However, with respect to navigation, a user may find thebuilding details and cars a distraction. By contrast, the map view inFIG. 5B, based on a generated three-dimensional model, is aestheticallycleaner and simpler, and as a consequence, the street and buildingimages are easier to visually process. While some visual details arelost, the gain in the ease of identifying streets and buildings may be apreferable outcome to a user more interested in navigating than in theshape of a roof or how many air conditioning units are on a given roof.In some embodiments, when the two-dimensional mapping informationdiscussed above indicates a green space such as a park, the map tool maydisplay a flat area without buildings. Further, in some cases, flatareas may be colored to indicate that the area is a green space, or aflat area may be colored blue to indicate that the area is a body ofwater.

In some embodiments, a map tool may receive input indicating a locationin a map. For example, a user of multifunction device 300 or a user at adesktop computer may enter an address or otherwise indicate a certainlocation, such as Austin Children's Museum or the corner of Sixth Streetand Congress Avenue.

Given a location in a map, the map tool may receive or requesttwo-dimensional mapping information for the map. For example, the maptool may receive or request from Map Service 380 mapping informationincluding footprints for objects within the area indicated through thelocation in the map.

Given the location in the map, the map tool may also receive or requestheight information for the map. For example, the map tool may receive orrequest from Map Service 380 mapping information that includes heightvalues for various objects within the area indicated through thelocation in the map. The mapping information may be vector data insteadof raster data.

The map tool may then, similar to the process described above in regardto FIG. 4A, correlate a location or point in the footprint of an objectin the map region with a height value from the height information. Insome cases, one or more points in or proximate to the footprint may becorrelated to respective height values in the height information. Forexample, height values for each corner of the footprint, or a pointsalong the perimeter, or only a single height value for somewhere nearthe center of the footprint. In some cases, given multiple points withinthe footprint, the map tool may select the highest height value from therespective, corresponding height values. In other cases, the map toolmay calculate an average height value from the multiple height valuescorresponding to the respective points in the footprint. In other cases,the height and top of the extruded footprint may be created through thecreation of a surface connecting each of different height values withina given footprint.

Similar to the creation of a three-dimensional model described above inregard to FIG. 4A, the map tool may render a three-dimensionalrepresentations of the objects based on the height information, wherethe rendering includes extruding a respective footprint for each objectto create a respective three-dimensional version of the object throughthe addition of a height value, or height values, or a height valuebased on multiple height values. In some cases, the map tool mayrepresent the collection of extruded footprints within a data structurestoring the defining information for each of the extruded footprints, inaddition to information for where within the map region the givenextruded footprint exists.

Given a rendering of each extruded footprint, which is athree-dimensional object, the map tool may display a three-dimensionalversion of the three-dimensional object in a view of the map region.Upon displaying each of the generated three-dimensional objects, a usermay see a version of the map region that is a simplified version of themap region, as compared to a raster-based map view or a photo-realisticversion of the map region.

In some embodiments, the map tool may receive or request two-dimensionalmapping information for a map or map region, where the two-dimensionalmapping information includes a footprint for an object. The map tool mayalso receive or request three-dimensional mapping information for themap region, such as mesh data from Map Service 380, where thethree-dimensional mapping information includes multiple height valuescorresponding to one or more locations in the map.

Given the two different kinds of mapping information, the map tool maycorrelate a given location of the footprint of the object with arespective height value from the multiple height values in thethree-dimensional mapping information. In order for the correlationbetween the locations in the two-dimensional mapping information toheight values in the three-dimensional mapping information to be valid,both sets of mapping information depict or describe an overlapping areaof the map or map region.

Given a footprint for an object and at least one height valuecorresponding to the footprint, the map tool may extrude the footprint,based on the height value, to create a three-dimensional version of theobject. The map tool may then display the three-dimensional version ofthe object. In the general case, the map tool may repeat the correlatingand extruding processes for each footprint in the map region in order todisplay a complete three-dimensional view of the map region.

In some embodiments, the map tool may begin with the creation of arepresentation of map area, where the representation is divided intosegments defined in terms of two-dimensional space. For example, the maparea may correspond to a 200 square meter area, and each segment may bedefined to correspond to a square meter. In other cases, segments may bedefined in terms of other shapes.

The map tool may then request or receive three-dimensional mappinginformation for the map, where the three-dimensional mapping informationincludes height values corresponding to at least one point in eachsegment location. The map tool may then correlate a respective heightvalue for each of the segments. In some cases, for a given segment, themap tool may correlate a height value from the center of the segment andfor a point along each side of the segment.

Given the segments and respective height values, the map tool maygenerate a three-dimensional version of the segment through the additionof a respective height value to a respective segment. In this way, themap tool creates an extruded, three-dimensional version of thetwo-dimensional segment. This process may be repeated for each segment.

At this point, the map tool has generated a model with multiple segmentsof varying heights and may display a three-dimensional view of the mapbased on the model. If each of the segments is displayed as definedwithin the model, the result may be a mesh-like display of segments withlines bounding each segment. Therefore, in some cases, the map tool maysmooth the segments, for example, if the height difference betweenadjacent segments is zero, small, or within a threshold value, then themap tool may merge the segments into one segment such that each adjacentside of the individual segments become a single surface. This processmay be repeated for each segment in the model.

Given a map view based on the generated three-dimensional model, the maptool may receive input corresponding to a navigation operation or to achange in virtual camera viewpoint. For example, a user may wish to see,given a display of a building within a map view, the view from the otherside of the building. In such a case, through a finger swipe, othergesture on a touch-sensitive screen, the map tool may update the mapview in response to the user input. Further, given that the modelinformation already exists within the model, the model does not need tobe regenerated, meaning that no new mapping information is needed toprovided the user with a new view of the map area.

In some embodiments, only footprints are subdivided into segments, andafter the map tool performs the above-described smoothing/mergingoperation, the resulting three-dimensional version of the footprint mayhave a more accurate representation of the top of the building sinceeach of the tops of each segments would have been smoothed together intoone surface.

In some embodiments, a map view is updated as the user and multifunctiondevice change positions or as a user on a desktop computer navigateswithin a map view. In such a case, the map view may be updated based ona combination of an already computed three-dimensional model augmentedwith computed model information for the new area displayed in the map asa result of the change in location. In this way, in this case, acomplete recalculation of the 3D model is avoided, and only the area ofthe map that is new is used to augment the already generated 3D model.

In some cases, based on a projection of where the user is going, the maptool may prefetch corresponding mapping information, and if theprojection is wrong or partially wrong, some or all of the prefetchedmapping information may be discarded.

In some embodiments, the map tool may generate, based on multiple datasets, a three-dimensional model of a map region including multiplethree-dimensional objects. The map tool may generate thethree-dimensional model according to any of the above described methodfor generating a three-dimensional model.

The map tool may then display a map view based on the three-dimensionalmodel. The map tool may, through an interface, input indicating aselection of an object in the three-dimensional model. In the case of amobile device, the interface may be a touch-sensitive display screen. Inthe case of a desktop computer, the interface may a window and the inputmay be a selection of an object displayed in the window. In either case,based on the input, the map tool determines an object in the displayedthree-dimensional model to select.

In some cases, given a map view, a user may adjust the virtual cameraperspective from which the map is drawn. For example, given aconstructed three-dimensional model as described, a user may viewdifferent sides of a building in the map view without using additionalmapping information and based solely on the already constructedthree-dimensional model.

Given a selected object, the map tool may invoke a function thatextracts data from one or more of the data sets of mapping informationfrom which the three-dimensional model was generated or from other datarelated to the map region. In some cases, the user may choose to displayadditional information regarding the selected object. For example, on amobile device, a user may tap and hold a finger over a displayed objectin the map view, the map tool may then provide the user with variousoptions, such as adding a label, displaying an already assigned labelfor the object, displaying information regarding businesses within thebuilding, whether or not the selected object is a point of interest,whether or not the object includes a restroom, among other options. Inthe case that the user adds a label, the user may choose for the labelto be shared and the label information may be uploaded to Map Service380 to be provided to other users. In some cases, the map tool mayretrieve the additional information from Map Service 380.

In some cases, Map Service 380 may provide information collected fromother users that have previously provided feedback or informationregarding the selected object. This crowdsourced information may includesuch things as ratings for a restaurant within the building, comments onthe cleanliness of a public restroom, or hours of operation of anybusinesses within the building.

In the case that the user selection may be satisfied based on thealready received mapping information, the map view may be updated basedon the specified function and data extracted from the mappinginformation data sets. For example, if the user selects to display aselected building with greater texture detail, the map tool may extractthe information from the multiple data sets described above. However, inother cases, as described above, the map view may be updated based oninformation from other data sources.

Roof Analysis Tool Module

FIG. 8A illustrates an embodiment of an Roof Analysis Module 800. Asnoted above, the Roof Analysis Module 800 may implement each of thedifferent embodiments of a roof analysis tool.

In some embodiments, Control Module 804 may receive Input 802, which maybe various types of mapping data as described above with respect toFIGS. 4A-4E. Given mapping data, Control Module 804 may invoke MappingData Module 806 to process the mapping data and to identify, for a givenfootprint, multiple points on the roof of a structure corresponding tothe footprint.

Based on the points in the roof, Normal Calculation Module 808 maycalculate, in three-dimensional Cartesian coordinates, a respectivenormal for each respective point. Based on the calculated normals,Normal Clustering Module 810 may convert the three-dimensional Cartesiancoordinates for each normal into spherical coordinates and apply atransformation in order to generate a two-dimensional output from whichclusters of normals may be identified.

From the identified clusters of normals, Plane Identification Module 812may determine a respective plane of a roof that corresponds to arespective cluster of normals from the identified cluster of normals.

From the identified planes of a roof, Archetypal Identification Module814 may determine the classification of the roof type. Depending on theembodiment of the roof analysis tool, Parameterization Module 816 maygenerate a parameter set indicating a roof classification and anidentification of a corresponding building for the roof, orParameterization Module 816 may generate a parameter set describingcoordinate data for each of the planes of a roof and an identificationof a corresponding building for the roof.

The parameter set may then be provided as output 820 in order for theroof parameter set to be used as a basis for rendering a map view for amap region including the building for the roof.

Map Tool Module

FIG. 8B illustrates an embodiment of a Map Tool Module 850. As notedabove, the Map Tool Module 850 may implement each of the differentembodiments of a map tool.

In some embodiments, Control Module 854 may receive Input 852, which maybe various types of mapping information, as described above with respectto FIGS. 4A-4E. Given the mapping information, Control Module 854 mayinvoke Model Generation Module 856 to generate a model of thesurrounding environment, according to various embodiments discussedabove.

Given a model of the surrounding environment, Control Module 854 mayinvoke User Interface Module 858 in response to various user inputsindicating, among other things, a selection of an object within a mapview, information for labeling an object in the map view, or requestingmore information or specific information regarding an object in the mapview. In some cases, depending on the input, Map Tool Module 850 maycommunicate with Map Service 380 through Map Information InterfaceModule 860 to request or receive mapping information.

Depending on the embodiment and current state, Control Module 854 mayprovide a display of a map view as Output 870.

Example Computer System

FIG. 7 illustrates computer system 9900 that may execute the embodimentsdiscussed above. In different embodiments, the computer system may beany of various types of devices, including, but not limited to, apersonal computer system, desktop computer, laptop, notebook, or netbookcomputer, mainframe computer system, handheld computer, workstation,network computer, a camera, a set top box, a mobile device, a consumerdevice, video game console, handheld video game device, applicationserver, storage device, a television, a video recording device, aperipheral device such as a switch, modem, router, or in general anytype of computing or electronic device.

In one embodiment, computer system 9900 includes one or more processors9360 a-9360 n coupled to system memory 9370 via input/output (I/O)interface 9380. The computer system further includes network interface9390 coupled to I/O interface 9380, and one or more input/output devices9382, such as cursor control device 9960, keyboard 9970, and one or moredisplays 9980. In some embodiments, it is contemplated that embodimentsmay be implemented using a single instance of a computer system, whilein other embodiments may be implemented on multiple such systems, ormultiple nodes making up a computer system, may be configured to hostdifferent portions or instances of embodiments. For example, in oneembodiment some elements may be implemented via one or more nodes of thecomputer system that are distinct from those nodes implementing otherelements.

In various embodiments, the computer system may be a uniprocessor systemincluding one processor, or a multiprocessor system including severalprocessors (e.g., two, four, eight, or another suitable number). Theprocessors may be any suitable processor capable of executinginstructions. For example, in various embodiments, the processors may begeneral-purpose or embedded processors implementing any of a variety ofinstruction set architectures (ISAs), such as the x86, PowerPC, SPARC,or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, eachof processors may commonly, but not necessarily, implement the same ISA.

In some embodiments, at least one processor may be a graphics processingunit. A graphics processing unit or GPU may be considered a dedicatedgraphics-rendering device for a personal computer, workstation, gameconsole or other computing or electronic device. Modern GPUs may be veryefficient at manipulating and displaying computer graphics, and theirhighly parallel structure may make them more effective than typical CPUsfor a range of complex graphical algorithms. For example, a graphicsprocessor may implement a number of graphics primitive operations in away that makes executing them much faster than drawing directly to thescreen with a host central processing unit (CPU). In variousembodiments, the content object processing methods disclosed herein may,at least in part, be implemented with program instructions configuredfor execution on one of, or parallel execution on two or more of, suchGPUs. The GPU(s) may implement one or more application programmerinterfaces (APIs) that permit programmers to invoke the functionality ofthe GPU(s). Suitable GPUs may be commercially available from vendorssuch as NVIDIA Corporation, ATI Technologies (AMD), and others.

System memory within the computer system may be configured to storeprogram instructions and/or data accessible from a processor. In variousembodiments, the system memory may be implemented using any suitablememory technology, such as static random access memory (SRAM),synchronous dynamic RAM (SDRAM), nonvolatile/Flash-type memory, or anyother type of memory. In the illustrated embodiment, programinstructions and data may implement desired functions, such as thosedescribed above for the various embodiments are shown stored withinsystem memory 9370 as program instructions 9925 and data storage 9935,respectively. In other embodiments, program instructions and/or data maybe received, sent or stored upon different types of computer-accessiblemedia or on similar media separate from system memory or the computersystem. Generally, a computer-accessible medium may include storagemedia or memory media such as magnetic or optical media, e.g., disk orCD/DVD-ROM coupled to the computer system via the I/O interface. Programinstructions and data stored via a computer-accessible medium may betransmitted from transmission media or signals such as electrical,electromagnetic, or digital signals, which may be conveyed via acommunication medium such as a network and/or a wireless link, such asmay be implemented via the network interface.

In one embodiment, the I/O interface may be configured to coordinate I/Otraffic between the processor, the system memory, and any peripheraldevices in the device, including a network interface or other peripheralinterfaces, such as input/output devices. In some embodiments, the I/Ointerface may perform any necessary protocol, timing or other datatransformations to convert data signals from one component into a formatsuitable for another component to use. In some embodiments, the I/Ointerface may include support for devices attached through various typesof peripheral buses, such as a variant of the Peripheral ComponentInterconnect (PCI) bus standard or the Universal Serial Bus (USB)standard, for example. In some embodiments, the function of the I/Ointerface may be split into two or more separate components, such as anorth bridge and a south bridge, for example. In addition, in someembodiments some or all of the functionality of the I/O interface, suchas an interface to system memory, may be incorporated directly into theprocessor.

The network interface of the computer system may be configured to allowdata to be exchanged between the computer system and other devicesattached to a network, such as other computer systems, or between nodesof the computer system. In various embodiments, the network interfacemay support communication via wired or wireless general data networks,such as any suitable type of Ethernet network, for example; viatelecommunications/telephony networks such as analog voice networks ordigital fiber communications networks; via storage area networks such asFibre Channel SANs, or via any other suitable type of network and/orprotocol.

The I/O devices may, in some embodiments, include one or more displayterminals, keyboards, keypads, touchpads, scanning devices, voice oroptical recognition devices, or any other devices suitable for enteringor retrieving data from one or more computer systems. Multiple I/Odevices may be present in the computer system or may be distributed onvarious nodes of the computer system. In some embodiments, similar I/Odevices may be separate from the computer system and may interact withone or more nodes of the computer system through a wired or wirelessconnection, such as over the network interface.

The memory within the computer system may include program instructionsconfigured to implement each of the embodiments described herein. In oneembodiment, the program instructions may include software elements ofembodiments of the modules discussed earlier. The data storage withinthe computer system may include data that may be used in otherembodiments. In these other embodiments, other or different softwareelements and data may be included.

Those skilled in the art will appreciate that the computer system ismerely illustrative and is not intended to limit the scope of theembodiments described herein. In particular, the computer system anddevices may include any combination of hardware or software that canperform the indicated functions, including a computer, personal computersystem, desktop computer, laptop, notebook, or netbook computer,mainframe computer system, handheld computer, workstation, networkcomputer, a camera, a set top box, a mobile device, network device,internet appliance, PDA, wireless phones, pagers, a consumer device,video game console, handheld video game device, application server,storage device, a peripheral device such as a switch, modem, router, orin general any type of computing or electronic device. The computersystem may also be connected to other devices that are not illustrated,or instead may operate as a stand-alone system. In addition, thefunctionality depicted within the illustrated components may in someembodiments be combined in fewer components or distributed in additionalcomponents. Similarly, in some embodiments, the functionality of some ofthe illustrated components may not be provided and/or other additionalfunctionality may be available.

Those skilled in the art will also appreciate that, while various itemsare illustrated as being stored in memory or on storage while beingused, these items or portions of them may be transferred between memoryand other storage devices for purposes of memory management and dataintegrity. Alternatively, in other embodiments some or all of thesoftware components may execute in memory on another device andcommunicate with the illustrated computer system via inter-computercommunication. Some or all of the system components or data structuresmay also be stored (e.g., as instructions or structured data) on acomputer-accessible medium or a portable article to be read from anappropriate drive, various examples of which are described above. Insome embodiments, instructions stored on a computer-accessible mediumseparate from the computer system may be transmitted via transmissionmedia or signals such as electrical, electromagnetic, or digitalsignals, conveyed via a communication medium such as a network and/or awireless link. Various embodiments may further include receiving,sending or storing instructions and/or data implemented in accordancewith the foregoing description upon a computer-accessible medium.Accordingly, the present invention may be practiced with other computersystem configurations.

CONCLUSION

Various embodiments may further include receiving, sending or storinginstructions and/or data implemented in accordance with the foregoingdescription upon a computer-accessible medium. Generally, acomputer-accessible medium may include storage media or memory mediasuch as magnetic or optical media such as disks or DVD/CD-ROM, volatileor non-volatile media such as RAM, ROM, flash drives, as well astransmission media or signals such as electrical, electromagnetic, ordigital signals, conveyed via a communication medium such as networkand/or a wireless link.

The various methods described herein represent example embodiments ofmethods. These methods may be implemented in software, hardware, orthrough a combination of hardware and software. The order of the methodsteps may be changed, and various elements may be added, reordered,combined, omitted, or modified.

Various modifications and changes may be made as would be obvious to aperson skilled in the art having the benefit of this disclosure. It isintended that the invention embrace all such modifications and changesand, accordingly, the above description to be regarded in anillustrative rather than a restrictive sense.

What is claimed is:
 1. A method, comprising: performing, by one or morecomputing devices: accessing footprint data for one or more structureswithin a map region; identifying, from a three-dimensional data setcorresponding to the map region and based on the footprint data for astructure of the one or more structures within the map region, aplurality of points on a roof of the structure; calculating, based onthe plurality of points on the roof of the structure, a plurality ofnormals; generating a two-dimensional representation comprising acorresponding pair of geometric coordinates for each of the plurality ofnormals, each pair of geometric coordinates determined based at least inpart on a transformation of corresponding three-dimensional coordinatesof the corresponding normal for the plurality of normals; identifying,based at least in part on the two-dimensional representation of theplurality of normals, a plurality of groups of normals from among theplurality of normals; identifying, based on different respective groupsof normals within the plurality of groups of normals, differentrespective planes of the roof; and determining a parameter set for theroof of the structure based on parameter values describing the differentrespective planes of the roof that have been identified based on thedifferent groups of normals.
 2. The method of claim 1, wherein saiddetermining further comprises identifying, based on each respectiveplane of the roof identified based on the different respective groups ofnormals, a classification of a roof type, wherein the respective groupsof normals have been identified based at least in part on thetwo-dimensional representation of the plurality of normals.
 3. Themethod of claim 2, wherein said determining further comprises basing theparameter set on an identification value for the classification of theroof type and an identification of the structure for which the roofcorresponds.
 4. The method of claim 1, wherein said generating thetwo-dimensional representation comprises: generating a two-dimensionalhistogram based on a Hough transformation of spherical coordinates foreach of the plurality of normals; and identifying clusters of normals inthe two-dimensional histogram based on a mass threshold value; whereinthe groups of normals are based at least in part on the clusters ofnormals.
 5. The method of claim 4, further comprising determining aclassification of a roof type based on the respective orientation ofeach respective plane of the roof.
 6. A system, comprising: a computingdevice comprising at least one processor; and a memory comprisingprogram instructions, wherein the program instructions are executable bythe at least one processor to: access footprint data for one or morestructures within a map region; identify, from a three-dimensional dataset corresponding to the map region and based on the footprint data fora structure of the one or more structures within the map region, aplurality of points on a roof of the structure; calculate, based on theplurality of points on the roof of the structure, a plurality ofnormals; generate a two-dimensional representation comprising acorresponding pair of geometric coordinates for each of the plurality ofnormals, each pair of geometric coordinates determined based at least inpart on a transformation of corresponding three-dimensional coordinatesof the corresponding normal for the plurality of normals; identify,based at least in part on the two-dimensional representation of theplurality of normals, a plurality of groups of normals from among theplurality of normals; and identify, based on the plurality of groups ofnormals, a roof type classification for the structure.
 7. The system ofclaim 6, wherein to identify the roof type classification for thestructure, the program instructions are further executable by the atleast one processor to determine, for each respective group of normalswithin the plurality of groups of normals, a respective plane of theroof, wherein each respective group of normals has been identified basedat least in part on the two-dimensional representation of the pluralityof normals.
 8. The system of claim 7, wherein to identify the roof typeclassification for the structure, the program instructions are furtherexecutable by the at least one processor to determine, for eachrespective plane of the roof, a respective orientation based on anaverage normal for a respective group of normals of the plurality ofnormals.
 9. The system of claim 8, wherein to identify the roof typeclassification for the structure, the program instructions are furtherexecutable by the at least one processor to determine, based on arespective orientation for each respective plane of the roof, asimilarity between the respective orientation for the respective planeof the roof and an orientation of a plane of an archetypal roof for theroof type classification.
 10. The system of claim 9, wherein the rooftype classification is determined to be similar when less than allplanes of the archetypal roof are determined to be similar to therespective planes of the roof of the structure.
 11. A non-transitory,computer-readable storage medium storing program instructions, whereinthe program instructions are computer-executable to implement:receiving, for a map region, three-dimensional mapping data comprising aplurality of triangles representing a respective plurality of surfaceregions for objects in the map region; identifying a subset of trianglesof the plurality of triangles, wherein the subset of trianglescorrespond to a roof for a building in the map region; calculating anormal for a surface of a triangle within the subset of triangles,wherein the normal is represented in three-dimensional Cartesiancoordinates; transforming the three-dimensional Cartesian coordinates ofthe normal for the surface of the triangle into spherical coordinatesfor a unit sphere; and reducing, based at least in part on using rhoangle and psi angle parameters instead of theta angle and phi angleparameters in said transforming the three-dimensional Cartesiancoordinates of the normal, a range of azimuth angles used in identifyinga plane, wherein the range of azimuth angles is due to a range of z-axisvalues in the three-dimensional Cartesian coordinates for the normal forthe surface of the triangle.
 12. The non-transitory, computer-readablestorage medium of claim 11, wherein the range of azimuth angles in thetheta-phi spherical coordinates is 360 degrees due to z-axis values fornormals for the surfaces of the subset of triangles, and wherein a rangeof azimuth angles in the rho-psi spherical coordinates is 180 degrees.13. The non-transitory, computer-readable storage medium of claim 12,wherein the program instructions are computer-executable to furtherimplement: determining, for each plane in the roof and based on the rhoangle and psi angle parameters, a respective plane orientation.
 14. Thenon-transitory, computer-readable storage medium of claim 11, whereinthe program instructions are computer-executable to further implementgenerating a two-dimensional histogram based on a Hough transformationof spherical coordinates for each of a plurality of normals for thesubset of triangles.
 15. The non-transitory, computer-readable storagemedium of claim 14, wherein the program instructions arecomputer-executable to further implement identifying the plane, andwherein the plane is a plane of a roof for a building based on thetwo-dimensional histogram.
 16. A method, comprising: performing, by oneor more computing devices: identifying, from a three-dimensional dataset corresponding to a map region, a plurality of points on a roof of astructure within the map region; calculating, based on the plurality ofpoints on the roof of the structure, a plurality of normalsperpendicular to the roof of the structure; generating a two-dimensionalrepresentation comprising a corresponding pair of geometric coordinatesfor each of the plurality of normals, each pair of geometric coordinatesdetermined based at least in part on a transformation of correspondingthree-dimensional coordinates of the corresponding normal for theplurality of normals; identifying, based at least in part on thetwo-dimensional representation of the plurality of normals, a pluralityof groups of normals from among the plurality of normals; identifying,based at least in part on the two-dimensional representation of theplurality of normals, for each respective group of normals within theplurality of groups of normals, a respective plane of the roof of thestructure; and identifying, based on each respective plane of the roof,a classification for a roof type.
 17. The method of claim 16, whereinsaid identifying the classification for the roof type further comprisesdetermining that one or more planes of a stored archetype for a rooftype are oriented similarly to a corresponding one or more planes of theplanes of the roof.
 18. The method of claim 16, wherein said identifyingthe plurality of points on the roof of the structure within the mapregion further comprises using a subset of the three-dimensional dataset corresponding to an area of the map region defined by a footprint ofthe structure.
 19. The method of claim 16, wherein said generatingfurther comprises generating a two-dimensional histogram based onspherical coordinates for each of a plurality of normals, including afirst axis representing a first spherical coordinate and a second axisrepresenting a second spherical coordinate distinct from the firstspherical coordinate.
 20. The method of claim 16, further comprisingdetermining a respective shape for each respective plane of the roofbased on a tangent plane.